Operating System - HP-UX
1753793 Members
7036 Online
108799 Solutions
New Discussion юеВ

when to use vgcfgrestore v/s vgimport

 
Sid Shapiro
Occasional Advisor

when to use vgcfgrestore v/s vgimport

I am little confused over the usuage of vgcfgrestore command v/s vgimpot . Can anybody explain me under what circumstances we have to use them.

Example : I have a disk drive connected to a Controller A . If i want to change the disk drive to some other controller , the device name of the disk will be change . So should i need to do a vgcfgbackup anf vgcfgrestore or vgexport and vgimport ?

Deepak Seth
3 REPLIES 3
Victor BERRIDGE
Honored Contributor

Re: when to use vgcfgrestore v/s vgimport

vgexport is for removing vgroup definitions from a host in order to allow a vgimport.
Now you can vgexport the defs of a vg to a file and use the file to vgimport on another host for example.
So you use vgexport/vgimport to reconfigure on healthy systems whereas
vgcfgrestore is used to recover after a disk crash or when you are in trouble...
Sid Shapiro
Occasional Advisor

Re: when to use vgcfgrestore v/s vgimport

Hi victor,

so while putting the disk drive to another controller , i just need to the following

vgexport -m mapfile /dev/vg??
shutdown the machine and change the disk to different controller.
vgimport -m mapfile /dev/vg??
Deepak Seth
Cheryl Griffin
Honored Contributor

Re: when to use vgcfgrestore v/s vgimport

vgcfgrestore v/s vgimport:

Use vgcfgrestore in cases where a disk is replaced, and you need to restore the LVM information to the new disk.

Use vgimport when you need to (quickly and easily) copy over existing LVM information to disks from a map that was previously created with vgexport!! (That's the key, without the map, there is nothing to import!)
Say you wanted to build two identical systems. You can build one, and then use vgexport (in preview mode, with the map option). Transfer the map to the other system and use mkdir, mknod and vgimport.
Voila, two systems, same LVM information.
"Downtime is a Crime."