- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Need vgimport with correct lvm name
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2010 12:35 AM
05-26-2010 12:35 AM
One of the system has two VG. We create some LV on that VG using some name which will reflect the corresponding mount point. Like lvoracle for /oracle mount point.
Now my question how can I restore the VG with appropriate LV name . Normal vgimport command activate the VG with lvol1, lvol2 etc. but I want to restore as lvorcale etc.
What is the exact procedure?
Waiting for valuable reply.
Aungshu
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2010 12:54 AM
05-26-2010 12:54 AM
Re: Need vgimport with correct lvm name
# ll /dev/*/group
# mkdir /dev/vg01 (you could also choose another VG name)
# mknod /dev/vg01/group c 64 0x##0000
Now copy the mapfile from system A and import the VG:
# vgimport -v -s -m /tmp/vg01.map vg01
now you can rename the LV
# umount /dev/vg01/lvol1
# mv /dev/vg01/lvol1 /dev/vg01/lvdata
# mv /dev/vg01/rlvol1 /dev/vg01/rlvdata
# mount /dev/vg01/lvdata
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2010 01:03 AM
05-26-2010 01:03 AM
Re: Need vgimport with correct lvm name
Any other way that I restore the LVM as my original LVM name ?
Aungshu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2010 01:25 AM
05-26-2010 01:25 AM
Re: Need vgimport with correct lvm name
If you export the volume group to map file it will export the logical names with their names. So later when you import the volume group it will be imported with the same logical volume names. There is no other way keep the names of the logical volumes.
This is how you export it:
vgexport -p -v -m vg01.map vg01
And this is how you import it:
vgimport -p -v -m vg01.map vg01 /dev/disk/diskX
The case where vgimport imports the logical volumes with lvol1, lvol2 and so on is when you don't have a map file and execute vgimport without this option.
Regards,
Sve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2010 01:29 AM
05-26-2010 01:29 AM
Re: Need vgimport with correct lvm name
Doing
vgexport -p -m
will create a mapfile with the name of the original logical volumes for this vg. If you do
vgimport -m
..you will have the vg with the original lv names.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2010 01:39 AM
05-26-2010 01:39 AM
Re: Need vgimport with correct lvm name
Thanks for the post. But when I execute the commnad it shows following error:
vgexport -p -v -m vgtest1.map vgtest1 /dev/dsk/c0t2d0
Usage: vgexport
[-m mapfile]
[-p]
[-v]
[-f OutFile]
VolumeGroupName
vgexport
[-m mapfile]
-s [-p] [-v] VolumeGroupName
"/dev/dsk/c0t2d0": Too many arguments
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2010 01:50 AM
05-26-2010 01:50 AM
Re: Need vgimport with correct lvm name
# vgchange -a n vgtest1
Export the VG:
# vgexport â v -s -m /tmp/vgtest1.map vgtest1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2010 01:50 AM
05-26-2010 01:50 AM
Re: Need vgimport with correct lvm name
# vgchange -a n vgtest1
Export the VG:
# vgexport -v -s -m /tmp/vgtest1.map vgtest1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2010 01:53 AM
05-26-2010 01:53 AM
SolutionIt must be:
vgexport -p -v -m vgtest1.map vgtest1
without the disk device file.
If you also want a map of the disks, you mast do:
vgexport -p -v -m vgtest1.map -f vgtest1.dsk vgtest1
or
vgexport -p -v -s -m vgtest1.map vgtest1
(note the "-s"). The resulting mapfile will have the vgid and in the vgimport phase, it will search for those disks with that vgid.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2010 01:54 AM
05-26-2010 01:54 AM
Re: Need vgimport with correct lvm name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2010 01:57 AM
05-26-2010 01:57 AM
Re: Need vgimport with correct lvm name
vgimport -v -m vgtest1.map /dev/vgtest1 /dev/dsk/c0t2d0
Beginning the import process on Volume Group "/dev/vgtest1".
Logical volume "/dev/vgtest1/lvtest2" has been successfully created
with lv number 2.
Logical volume "/dev/vgtest1/lvtest1" has been successfully created
with lv number 1.
vgimport: Volume group "/dev/vgtest1" has been successfully created.
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating the volume group.
Aungshu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2010 02:03 AM
05-26-2010 02:03 AM