LVM and VxVM

Fresh install with vgexport/vgimport?

Go to solution
Occasional Contributor

Fresh install with vgexport/vgimport?

I am going to do a fresh install of 11.11 on a 10.20 system. Can vgexport/vgimport be used so that I do not have to recreate and restore my vg01 file systems and data?
A. Clay Stephenson
Acclaimed Contributor

Re: Fresh install with vgexport/vgimport?

Yes, that works just fine although the converse is not true. You will probably want to run vxupgrade after importing to come up to the newest level but if you do that the filesystems can never again be used on 10.20.
If it ain't broke, I can fix that.
Occasional Contributor

Re: Fresh install with vgexport/vgimport?

That is not a problem as after this install we hope 10.20 to be a thing of the past.
Pete Randall
Outstanding Contributor

Re: Fresh install with vgexport/vgimport?



Beforehand, run

vgexport -s -m /tmp/vg01map /dev/vg01

The copy the resulting map to your new install and do the following

mkdir /dev/vg01
mknod /dev/vg01/group c64 0x010000
vgimport -s -m /tmp/vg01map /dev/vg01
vgchange -a y vg01

That should do it.


Sridhar Bhaskarla
Honored Contributor

Re: Fresh install with vgexport/vgimport?


Yes. That's the way you need to get your old data back.

Make sure you save your map files on a network server.

#vgexport -p -s -m /tmp/ vg01
#strings /etc/lvmtab > /tmp/lvmtab.ascii
#cp /etc/fstab /tmp/fstab.1020

Copy the files to a network server.
After installing 11.11 copy those files back and then do a vgimport

#mkdir /dev/vg01
#mknod /dev/vg01/group c 64 0x010000
#vgimport -v -s -m /tmp/ vg01
#vgchange -a y vg01

You add the filesystems corresponding to 10.20 to 11.11 by 'grep vg01 /tmp/fstab.1020 >> /etc/fstab"
Create mount points and then use "mount -a".

You may be disappointed if you fail, but you are doomed if you don't try