1836451 Members
2289 Online
110100 Solutions
New Discussion

vgexport / vgimport

 
SOLVED
Go to solution

vgexport / vgimport

Hello again. We have a K box HP-UX 10.20 with the data (vg01) in a RAID box. We purchased a new L2000 HP-UX 11.0 but we will be using the same RAID box from the K with the data in it (keep data and filesystem: vg01/lvol20). I've been reading this forum & saw a few hints and did 'man' on vgexport/vgimport. Since this is a major undertaking, what are the specific steps & parameters & other 'hidden beware' of moving the RAID box (vg01) from K box to L2000 without losing the data in it. And yes, I will be backing them up on tape. thanx in advance.
5 REPLIES 5
Marcin Wicinski
Trusted Contributor
Solution

Re: vgexport / vgimport

Hi Michael,

Old box:

vgchange -a n vg01
vgexport -s -v -m vg01.map /dev/vg01

then copy vg01.map to the new box and:

mkdir /dev/vg01
mknode /dev/vg01/group c 64 0x010000
vgimport -s -m vg01.map vg01
vgchange -a y vg01

good luck,

marcin
Marcin Wicinski
James R. Ferguson
Acclaimed Contributor

Re: vgexport / vgimport

Hi Michael:

It sounds like you have things in hand.

Use the 'mapfile' option of 'vgexport'. This allows the 'vgimport' to create logical volume devices files under the vg_name directory using the naming convention given in mapfile as opposed to the default naming convention used by the 'lvcreate'.

In total, you'll do something like this:

On old server:

# vgexport -s -p -m /tmp/lvmconf_vgNN.map /dev/vgNN

On new server:

# mkdir /dev/vgNN
# mknmod /dev/vgNN/group c 64 0xNN0000
# vgimport -v -s -m /tmp/lvmconf_vgNN.map /dev/vgNN
# vgchange -a y /dev/vgNN

Regards!

...JRF...

Re: vgexport / vgimport

Thanx to both Marcin & James. One more thing: will this keep the mount point (fstab) or do I have to recreate the mount point. I guess i can find out when I actually do it. Thanx again!!
Bill Hassell
Honored Contributor

Re: vgexport / vgimport

vgimport requires that you specify the volume group name and the mapfiles will ensure that the lvol names are correct. Therefore, fstab will be the same if you use the the same vgNN name.


Bill Hassell, sysadmin
Dave Wherry
Esteemed Contributor

Re: vgexport / vgimport

Michael,
One thing to watch for that bit us. When we created the map file from our 10.20 box there was a cryptic line at the top of the file. It looked like some sort of hex identifier or something. When we attempted to vgimport on our 11.0 box, it failed. We removed that extra line and the vgimport worked fine.
I've not seen any one else mention this type of problem so it may have been a fluke with us that maybe has been patched. Just a heads up for you.
By the way it worked great. A 200GB Oracle database moved from the old system to the new one in about 10 minutes.