1829590 Members
7321 Online
109992 Solutions
New Discussion

Re: Vgexport/vgimport

 
system administrator_15
Frequent Advisor

Vgexport/vgimport

Hi guys
I am rebiulding a server upgrading the operating system to 11i, i intend to do a fresh install and reload all relervant applications.
The question is that if i do a vgexport (vgexport -v -f outfile /dev/vg01) and the save out the the file to tape.
i then once os rebiult copy file back and do the normall mknod and create mount pionts.
Once complete if i run
vgimport -v -m tmp/vg01.mapfile /dev/vg01 /dev/dsk/c0t5d0 /dev/dsk/c0t7d0
will this then import all the information needed to activate the volume group and therefore make all data that is currently on these disks available again, thus making it not necassary to restore data.
as this would be saving us a lot of time and take away some the data loss risk.
any help appeciated.


6 REPLIES 6
Denver Osborn
Honored Contributor

Re: Vgexport/vgimport

Steps that should work for you.

unmount vg01 filesystems
# umount /mnt_pt

deactivate vg01
# vgchange -a n /dev/vg01

export vg01
# vgexport -s -v -m /tmp/vg01.map /dev/vg01

Save the /tmp/vg01.map file to another box or tape.

Save the info about your mount points
# grep vg01 /etc/fstab > /tmp/vg01.fstab

perform your cold install, then import vg01.

# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000

restore the vg01.map file

# vgimport -s -v -m /dev/vg01.map /dev/vg00

Activate the vg
# vgchange -a y /dev/vg00

Create the mount points and add the entries saved in /tmp/vg01.fstab to the /etc/fstab. Mount the filesystems.... you should be all set and able to access the data.

Hope this helps,
-denver
system administrator_15
Frequent Advisor

Re: Vgexport/vgimport

One quick point the vgimport, do i need to specify the disk device address at the end of vgimport command or does it get all that from the mapfile.
thanks
andy
Denver Osborn
Honored Contributor

Re: Vgexport/vgimport

If you use the "-s" option the map file will contain the VGID. The VGID will be used for importing the disks so you wouldn't need to specify disk devices.

-denver
Massimo Bianchi
Honored Contributor

Re: Vgexport/vgimport

Hello,
if you use the "-s" you don't have to specify the disk becuase they are searched using the VGID, saved in the mapfile.

This is the meaning of the "vgexport -s".

Otherwise do a vgexport -p -v -m MYmapfile -f MYdiskfile NYVG

and keep those files.

in the import

mkdir /dev/VGTT
mknod /dev/VGTT/group c 64 0xXX0000
vgimport -f MYdiskfile -m MYmapfile NYVG

HTH,
Massimo
Jarle Bjorgeengen
Trusted Contributor

Re: Vgexport/vgimport

Hi,

beware though if you use the -f option to vgimport, you need check/edit the file with devicenames so that it reflects the correct devicenames after the cold install.

The advantage of using -f is that you get full control over primary / alternate paths, for load sharing of the FC's .

Rgds Jarle
Open Systems
Advisor

Re: Vgexport/vgimport

Can anyone clarify if this process retains the original primary/alternate device config, ( eg for load balancing ) or would this need to be addressed afterwards.

THanks