Operating System - HP-UX
1844821 Members
1923 Online
110233 Solutions
New Discussion

How can I keep my VG's intact when doing a cold upgrade from 10.20 to 11i?

 
SOLVED
Go to solution

How can I keep my VG's intact when doing a cold upgrade from 10.20 to 11i?

How can I keep my VG's intact when doing a cold upgrade from 10.20 to 11i? Will a vgexport work?
6 REPLIES 6
John Poff
Honored Contributor

Re: How can I keep my VG's intact when doing a cold upgrade from 10.20 to 11i?

Hi,

You should be able to do a vgexport, install 11i, and then do a vgimport to get back your filesystems. I've done it before on a cold install from 10.20 to 11.00, and it should work the same way going to 11i. You'll just have to keep track of which PVs make up your VG now, and be able to correctly identify them after your installation of 11i. After installing 11i, you'll need to do the mkdir in /dev for your vgname, and do the mknod for the group file with a unique minor number. Then you'll be ready for your vgimport.

JP
Pete Randall
Outstanding Contributor
Solution

Re: How can I keep my VG's intact when doing a cold upgrade from 10.20 to 11i?

Glenn,

Before you start the process, do a vgexport -p -s -m /tmp/vgNNmap /dev/vgNN.

Then save the resulting mapfiles somewhere where you can get at them after the install. Then all you need to do is:

mkdir /dev/vgNN
mknod /dev/vgNN/group c 64 0xNN0000
vgimport -s -m /tmp/vgNNmap /dev/vgNN

That's all there is to it.

Pete

Pete
Sridhar Bhaskarla
Honored Contributor

Re: How can I keep my VG's intact when doing a cold upgrade from 10.20 to 11i?

Hi Glenn,

Yes. Your vgexport and vgimport with the map files will work.

Generate map files with various options and save them on another system.

#vgexport -p -v -s -m /tmp/vg01.s.map vg01
#vgexport -p -v -m /tmp/vg01.map -f /tmp/vg01.disks
#ll /dev/vg*/group > /tmp/group.info
#cp /etc/fstab /tmp/fstab.old

Copy vg01.s.map, vg01.map, group.info, fstab.old and vg01.disks to another system.

Once you are done with installing 11i, import the volume groups back by following this process.

Copy the above files into /tmp directory

#mkdir /dev/vg01
#mknod /dev/vg01/group -c 64 0x0?0000
(use the group number from group.info file)

Edit /tmp/vg01.disks and change the devices files. Only the controller numbers (cxx) will change.
#ioscan -fnC disk > /tmp/disk.out
Look at disk.out and see how the controller numbers got changed. So, modify vg01.disks accordingly. Once it is done import the vg.

#vgimport -v -m /tmp/vg01.map -f /tmp/vg01.disks vg01

If you are not sure about the disks, then you can import it with -s option.

#vgimport -v -s -m /tmp/vg01.s.map vg01.

This will scan the disks and import the ones that correspond to vg01.

#vgchange -a y vg01

paste the entries corresponding to vg01 from fstab.old into /etc/fstab

#mount -a

-Sri



You may be disappointed if you fail, but you are doomed if you don't try
Pete Randall
Outstanding Contributor

Re: How can I keep my VG's intact when doing a cold upgrade from 10.20 to 11i?

Glenn,

The use of the -s option on both the import and export in my example will eliminate having to fool around with the device files. The import will scan the LVM headers and construct the VGs for you.

Pete

Pete
Sridhar Bhaskarla
Honored Contributor

Re: How can I keep my VG's intact when doing a cold upgrade from 10.20 to 11i?

Hi,

Just a word of clarification.

I do not encourage the use of "-s" option unless it is inevitable. If you have enabled load balancing by changing the alternate links on the old system, you will have to redo it again if you use -s option. However, by simply replacing the controller numbers in the -f output, you can get the exact configuration back with -f option.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Dave Wherry
Esteemed Contributor

Re: How can I keep my VG's intact when doing a cold upgrade from 10.20 to 11i?

I used the vgexport and vgimport going from 10.20 to 11.0. As everyone else has said, it works great. One problem we ran into was some extra characters in the map file made the vgimport fail. We edited the map file and it worked fine. I believe this has probably been fixed by a patch because I've not seen that problem again.
Keep in mind that alternate links do not provide load balancing. They are just for failover. You'll want to check all of your links when you are finished and maybe adjust them to balance the load on your controllers.