LVM and VxVM

best way to move VG from old to new array w/o mirroring?

 
SOLVED
Go to solution
Lonny Balderston
Frequent Advisor

best way to move VG from old to new array w/o mirroring?

On a HP9000, we have replaced a VA7100 with a VA7410. We have moved most of the data by extending Volume Groups onto the new array, then mirroring. For one VG, we are unable to do this, as MAX PV=16 and mirroring would require 24 PV. So, I am soliciting suggestions as to how I can get a VG effectively moved from 1 array to another with the minimum of effort and downtime. It was suggested to me that we could back up the VG's data to tape, remove the VG, recreate the VG on the new array, and restore the data from tape. Is there a better solution? Thank you.
11 REPLIES 11
Patrick Wallek
Honored Contributor

Re: best way to move VG from old to new array w/o mirroring?

How many LV's make up this VG? Is it just one BIG LV, or a number of smaller ones?

Can you post 'vgdisplay -v' output for this VG? That may help us make some more informated recommendations.
Geoff Wild
Honored Contributor

Re: best way to move VG from old to new array w/o mirroring?

vxdump it to new vg:

timex vxdump -0 -f - -s 1000000 -b 16 /tempmountofold/oracle | (cd /oracle ; vxrestore rf -)

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Ajitkumar Rane
Trusted Contributor
Solution

Re: best way to move VG from old to new array w/o mirroring?

Mahlon,

Option that I can think of is pvmove. Add PV's to the VG till you reach the max PV value, move the data from the old PVs tothe new PVs, remove the old PVs from the VG, go on to add the other new PV's and follow the same.


Rgds,

Ajit
Amidsts difficulties lie opportunities
Lolupee
Regular Advisor

Re: best way to move VG from old to new array w/o mirroring?

do you use vxfs or vxvm
James R. Ferguson
Acclaimed Contributor

Re: best way to move VG from old to new array w/o mirroring?

Hi Mahlon:

In the absence of the ability to mirror, you will have to quiesce the use of each filesystem you want to move.

I would create the new volume group and associated logical volumes and copy the data from disk to disk at the file level with either a recursive 'cp'; 'fbackup' or 'cpio'.

Variously:

# cd srcdir && find . â depth â print | cpio â pudlmv dstdir

...or:

# cd srcdir && fbackup -i . -f - | ( cd dstdir && frecover -Xsrf - )

When done, edit your '/etc/fstab' to reflect the changed mount point and/or swap the source and directory names therein.

Regards!

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: best way to move VG from old to new array w/o mirroring?

Hi (again):

Sorry, the last snippets of code should read:

# cd srcdir && find . -depth -print | cpio -pudlmv dstdir

# cd srcdir && fbackup -i . -f - | ( cd dstdir && frecover -Xsrf - )

Regards!

...JRF...
Lonny Balderston
Frequent Advisor

Re: best way to move VG from old to new array w/o mirroring?

Wow, thanks!

Addl info: using vxfs, vg info attached. Also: new VG will need to have same name as old VG when we're done. Thanks again!
James R. Ferguson
Acclaimed Contributor

Re: best way to move VG from old to new array w/o mirroring?

HI (again) Mahlon:

Renaming a volume group is straightforward:

# unmount all logical volumes associated with the volume group
# vgchange -a n /dev/oldvg
# vgexport -m /tmp/oldvg.map /dev/oldvg
# mkdir /dev/newvg
# mknod /dev/newvg/group c 64 0x0n0000 # 'n' is unique and unused
# vgimport -m /tmp/oldvg.map /dev/newvg /dev/dsk/pv_path ...
# vgchange -a y /dev/newvg

Regards!

...JRF...
Lolupee
Regular Advisor

Re: best way to move VG from old to new array w/o mirroring?

I assume what you meant by mirroring would require 24PV is that your old disks are 24 and new is 16. Then youw new disks would be bigger than the old once.

From your data your PE size is 4MB and this is default for LVM. The max PE/PV is 2600. Which means the volume group would accept 2600X4 as the MAX size of each disk i.e very close to 10GB.

with the 16 disk for 24 Disks means the new disks are larger.

Summary, it is posible to vgextend the volume group with the new disks and pvmove the data from old disk, but you would loose a lot of space. i.e you will be able to access maybe 15.5GB from 16GB drive if it accepts. If this is ok then you can proceed in this line. This will require no outage but performance issue. You can do it when the server is less busy and you will not have to fight with Performance.

The problem with this though is PE size of 4GB is too small for large data systems. It is advisable to use a bigger PE size to improve the movement of large data within the disk.

To begin this process. Check if you have errors on the server and the size of disks.

# vgextend /dev/vgicgs
# pvdisplay -v

see your result, if the size is ok for you. Then this process is ok.