Operating System - HP-UX
1752309 Members
6111 Online
108786 Solutions
New Discussion юеВ

Re: How to migrate data from current disks to new disks.

 
kumasudh
Advisor

How to migrate data from current disks to new disks.

Hi,

I want to replace my current disks with the bigger size disks. Could somebody help in figuring out a procedure using that i can have all my volume_groups+logical_volumes+data on the freash new disks what i have now on current disks .

Thanks a lot in advance.

Best Regards
Sudhir
4 REPLIES 4
Johnson Punniyalingam
Honored Contributor

Re: How to migrate data from current disks to new disks.

Hi ,

Example:-
Current vg01 -->

vgextend /dev/vg01

than once the bigger_size_disk_has been added

pvmove -n /dev/vg01/lvol2 /dev/dsk/c1t0d0 /dev/dsk/c2t0d0

Thanks,
Best Regards,
Johnson
Problems are common to all, but attitude makes the difference
Ganesan R
Honored Contributor

Re: How to migrate data from current disks to new disks.

Hi,

Many ways you can do this..

First thing you should check wheather you will be able to use the full size of the new disks. Since you might have created the VG with default settings like PE size, max PE per PV which will limit the PV size.

If these settings are not enough to utilise the new disk better create a new VG and copy the data.

If the settings are well enough then you can add the new disks to the existing VG and use pvmove or mirror the lv's to copy the data.

let me know if you need the steps..
Best wishes,

Ganesh.
Ninad_1
Honored Contributor

Re: How to migrate data from current disks to new disks.

Hi,

The solution will depend on many things.
To start with, if the parameters of your already configured VGs allow addigin additional disks of bigger size into your VG
1. Max pe per pv * PE size should be greater than your new disk size.
2. Max PV should be greater than or equal to your currents disks + new disks (that will replace your curent disks in that VG)

If this is the case following is the option you can try.
i) Add the new disks to the corresponding VG (using pvcreate for the new disks and then vgextend)
ii) Use pvmove to move all the logical volumes from the current disks (PVs) to new disks (PVs)
iii) Use vgreduce to remove the old disks from the VG.
This can be done online without outage to your system. Only ensure that pvmove is done at relatively quiet period


Option 2 would be if you can take a complete outage on the system and the new disks into new VGs and create the corresponding logical volumes/filesystems and mount on temporary filesystems.
Then use backup/restore to restore the data to the new destination. Then remove the old VGs and mount the filesystems on new VG on the correct path.

This option will be effective if you do not have too many filesystems and can afford outage on applications.

Regards,
Ninad
likid0
Honored Contributor

Re: How to migrate data from current disks to new disks.

Check if your max pes per pv allow you to use the hole space of the new disk. If it doesn't you have to make a newvg/fs, mount it on temp spot and copy the data.

If your new disk fits, you can:

Add the NEW disk to the VG where the disk you want to change is.

and then if you have license for mirroring, use it!, it's safer than pvmove, if not you have to use pvmove(allways launch it from the console!)

Windows?, no thanks