cancel
Showing results for 
Search instead for 
Did you mean: 

Moving Logical Volumes

Rajasekhar Raman
Frequent Advisor

Moving Logical Volumes

I am faced with a situation wherein I have to migrate from 18GB drives to 73GB drives and so have to move the logical volumes off these drives to the 73GB drives. The volume group currently holds 81 Sybase devices (raw devices). I do not want to have to recreate the sybase devices. The following is what I thought of, I wanted to get an idea from any expert here if the procedure is sound, or even better, if there is a better way to do this. The one advantage I have is that I have sufficient free slots on my SC10 that I can hold both the 73GB and the current 18GBs on it. That may make it easier, I think (??). Also, currently all the logical volumes are striped ( vg01 contains 4 disks on 4 separate controllers ), and I am moving to 3 73GB drives (also on separate controllers )

Obviously since I cannot do a vgextend due to the max PE limitation, I plan to do the following:

Do a vgcfgbackup of vg01
create a vgtemp with the 73GB drives
recreate all logical volumes that are on vg01 ( I have a script that will do this)
Copy the raw devices from one volume group to the other using dd
vgexport -m vg01 /tmp/vg01.map
vgexport -m vgtemp /tmp/vgtemp.map
mkdir /dev/vg01; mknod /dev/vg01/group c 64 0x010000
vgimport -m /tmp/vgtemp.map /dev/vg01 /dev/dsk/diskA /dev/dsk/diskB /dev/dsk/diskC

Will this work and is it the best way to do it??

Thanks for all your suggestions.

-Shekar Raman
6 REPLIES
Stefan Farrelly
Honored Contributor

Re: Moving Logical Volumes


Looks good. Done procedures like this before myself, no problems. The new VG has the right parameters (Max pe per pv) for the larger drives, you create the lvols the exact same size as on the old vg, dd over the data, then rename your temp vg. Easy.

Im from Palmerston North, New Zealand, but somehow ended up in London...
S.K. Chan
Honored Contributor

Re: Moving Logical Volumes

Just a few comments..and minor details ..
1) Make sure you perform full backup of all your data in vg01 (just in case).
2) Generally the steps looks good but I thought the syntax fro the vgexport should be ..
# vgexport -m /tmp/vg01.map /dev/vg01
==> ie vgexport -m
3) I believe you got to de-activate the VG first before you can export it.
# vgchange -a n /dev/vg01
same goes to vgtemp and also after the vgimport you need to activate the VG.
# vgchange -a y /dev/vg01
Sean OB_1
Honored Contributor

Re: Moving Logical Volumes

Looks like you've got it all covered.

Now would be a good time to adjust anything that needs to be adjusted like max PE, PE extent size, etc.

Good Luck,

Sean
harry d brown jr
Honored Contributor

Re: Moving Logical Volumes

Looks good to me. Almost identical to what I did a few weeks ago!

live free or die
harry
Live Free or Die
Rajasekhar Raman
Frequent Advisor

Re: Moving Logical Volumes

Thanks for all your responses and corrections.

-Shekar Raman
Sandip Ghosh
Honored Contributor

Re: Moving Logical Volumes

I think, during taking the map of the volume group of vgtemp do it with -S to take the VGID, then restore the map with the name of the disk will be easier.

Sandip
Good Luck!!!