- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- vgexport -p option
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
09-15-2003 01:53 PM
09-15-2003 01:53 PM
vgexport -p option
I have read man page.
I have vgexport volume group vg10 in mapfile vgexport -m /tmp/vg10.map /dev/vg10 using this command. But when i import the on different system ( Source A from 11.0 to 11.11 Source B )it has given me an error
vgimport -m /tmp/vg10.map /dev/vg20
vgimport: Unable to read the physical volume.uxdevtst: /dev/vg20
I was able to use diskinfo and dd.
See the output below.
> diskinfo /dev/rdsk/c12t1d5
SCSI describe of /dev/rdsk/c12t1d5:
vendor: HP
product id: OPEN-E*18
type: direct access
size: 256076640 Kbytes
bytes per sector: 512
dd if=/dev/rdsk/c12t1d5 of=/dev/null bs=1024
37530+0 records in
37530+0 records out
NOW MY QUESTION ARE :
(1) DID MY PROBLEM HAPPEN BECAUSE OF -P OPTION ? IS -P OPTION IS MUST WITH VGEXPORT WHEN YOU ARE TRYING TO IMPORT WITH -M MAP FILE ?
(2) CAN I RESTORE MY VOLUME GROUP FROM MAP FILE SAME WAY ?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 02:03 PM
09-15-2003 02:03 PM
Re: vgexport -p option
The -p option is just the "preview" of the operation. vgexport command with -p option will create the map file but wont remove the VG from the system. So u dont have to deactive the VG from the system.
One thing that is missing in your command is that even with the mapfile u need to mention the PVs. the best option here to use is the -s option.
# vgexport -s -v -m /tmp/mapfile /dev/vg10
for importing
# mkdir /dev/vg20
# mknod /dev/vg20/group c 64 0x200000
# vgimport -s -v -m /tmp/mapfile /dev/vg20
See if this helps
Thanks
Sundar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 02:43 PM
09-15-2003 02:43 PM
Re: vgexport -p option
My understanding is -s option is shareable. If the VG is part of MC Service Guard Cluster You don`t need to use -s option.
Umang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 02:53 PM
09-15-2003 02:53 PM
Re: vgexport -p option
If you don't use -s then you must also specify the disks on the vgimport and that is what is missing in your use of vgimport.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 02:53 PM
09-15-2003 02:53 PM
Re: vgexport -p option
If you don't use -s then you must also specify the disks on the vgimport and that is what is missing in your use of vgimport.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 03:06 PM
09-15-2003 03:06 PM
Re: vgexport -p option
As said already, -p is for preview and -s is to generate map files with VGID information so that import will be easier.
In addition, another convenient way of exporting the volume groups is to use -f option. This will create a file with all the disks. During the import, you will just need to change the controller numbers (cx) in the file and import the VG. This will save your previous lvmtab structure.
vgexport -v -p -m /tmp/vgxx.map -f /tmp/vgxx.disks vgxx
This will not actually export but generates the map and disk information files for vgxx. Once you are done with your work, edit vgxx.disks and change the cx values if the instance numbers are changed.
vgimport -v -m /tmp/vgxx.map -f /tmp/vgxx.disks vgxx (after creating group device file).
It is better to preview export and generate various kind of map files like with -s, without -s and -f options etc.,
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 03:27 PM
09-15-2003 03:27 PM
Re: vgexport -p option
I would guess that you understand the -p option from the previous posts.
This is what we commonly use:
vgexport ???p -v ???m /tmp/import/vgjdaprod.map_prod vgjdaprod | sed ???1d???>/tmp/import/vgjdaprod.dev_prod
The sed statement parses out the devices for import on another system. Though the C numbers need to be changed, in some cases, for the other machine, the t and d numbers and primaries are inorder of the importance on the production machine. As mentioned, this is important in preserving the primary paths in multi path environments. (8 paths/dev in our environment)
Best of Luck.
Regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 06:55 PM
09-15-2003 06:55 PM
Re: vgexport -p option
I did mention the -s option so that you dont have list the PVs in the commandline. That is the trouble you have with the current commands u r trying
Sundar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2003 10:09 AM
09-16-2003 10:09 AM
Re: vgexport -p option
Thanks for reply. But No body have replied my 2nd question. If i want to restore same volume group. if you have exported volume group with only -m option. Which way now i can restore volume group without recreating it ? If I would use -p -s option in vgimport would that work ? or not ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2003 10:15 AM
09-16-2003 10:15 AM
Re: vgexport -p option
If you have used only "-m" option, then you will need to specify the corresponding disks of the volume groups. For ex., c1t2d0 and c1t3d0 are the disks in the volume group, then you would say
#mkdir /dev/vgxx
#mknod /dev/vgxx/group c 64 0x0?0000 (replace ? with a unique number less than maxvgs kernel parameter)
#vgimport -v -m your_mapfile vgxx /dev/dsk/c1t2d0 /dev/dsk/c1t3d0
If you don't have the list of the disks, then look at your /etc/lvmconf/vgxx.conf file. Do a "strings" on it and get the disks. You can put them all in one file and use "-f" option with the vgimport.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2003 10:16 AM
09-16-2003 10:16 AM
Re: vgexport -p option
Just curious..why would u like to just export and import it...is it for learning purpose or something ?
Once u export the VG with any option except -p option, you HAVE to create the volume group.
vgimport with -p and -s option wont do the trick for you. vgimport command requires the VG directory and the group file to be present.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2003 10:16 AM
09-16-2003 10:16 AM
Re: vgexport -p option
Just curious..why would u like to just export and import it...is it for learning purpose or something ?
Once u export the VG with any option except -p option, you HAVE to create the volume group.
vgimport with -p and -s option wont do the trick for you. vgimport command requires the VG directory and the group file to be present.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2003 10:17 AM
09-16-2003 10:17 AM
Re: vgexport -p option
Just curious..why would u like to just export and import it...is it for learning purpose or something ?
Once u export the VG with any option except -p option, you HAVE to create the volume group.
vgimport with -p and -s option wont do the trick for you. vgimport command requires the VG directory and the group file to be present.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2003 10:22 AM
09-16-2003 10:22 AM
Re: vgexport -p option
Here is an example:
mkdir -p /dev/vg10
chmod 750 /dev/vg10
mknod /dev/vg10/group c 64 0x0a0000
vgimport -m /tmp/vg10.map /dev/vg10 /dev/dsk/c12t1d6 [/dev/dsk/c1t5d3 ...]
BUT you must substitute the correct disk devices --- that is what the -s would have done for you but if you have already exported, it's too late.
NOTE: You can do a vgscan and it will try to find the disks.
A simple man of vgimport, vgexport, vgscan would have revealed all of this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2003 11:07 AM
09-16-2003 11:07 AM
Re: vgexport -p option
______________________________________
If you are moving cables to your disks/EMC/Compaq frames and the hardware paths change, the -s option attaches a unique VGID so that upon vgimport you wont have to figure out what disks are associated with each VG...
I have seen this happen a few times... it is very easy with the -s option and VERY hard with out it... hehe
one solution I used to goback and do it with the -s option is to restore your LVM definitions in /etc/lvmconf/* and then redo the vgexport with the -s option...
Trust me it will always make your life easier...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2003 01:23 AM
09-17-2003 01:23 AM
Re: vgexport -p option
vgexport -p is the preview option of vgexport.u can go through man pages for vgexport