1829492 Members
1524 Online
109991 Solutions
New Discussion

Move data to a new LUN

 
dev44
Regular Advisor

Move data to a new LUN

Hi,

We are moving off of one SAN onto another. Now in the HP-UX world, I would extend the VG with the new LUN and lvextend -m 1 each LV to the new LUN, then break the mirror lvreduce -m 0 and get rid of the old LUN, then remove the old LUN from the VG.

In RHEL we are trying to do this and I did an lvconvert -m1 vg01/lvol1 and it was all successfully mirrored. How do I now, break the mirror? I know I can lsconvert -m0 but how do I tell it to unload the old lun and keep the data on the new one? Or is this even possible? I am wondering if this is not possible with Linux and you can either mirror or not mirror but can't use it to move data.

Thanks,
Sally
whatever
2 REPLIES 2
Matti_Kurkela
Honored Contributor

Re: Move data to a new LUN

It should work sort of like in HP-UX, i.e.

lvconvert -m0 /dev/vg01/lvol1

would unmirror the LV, making the free and keeping the data on the new one.

An alternative would be to just brutally un-present the old LUN at the SAN level, or tell the SCSI subsystem to delete the old device:
echo 1 > /sys/block//device/delete

When one-half of the LVM-mirrored LV becomes inaccessible or fails in any other way, LVM should automatically convert the remaining half of the mirror back to a regular non-mirrored LV.

At the time of our last SAN migration, we used LVM mirror to migrate some RHEL 4 systems. Back then, the LVM mirror did the job, but somehow left me the impression of "fragility" - not quite ready for production use. But that was more than two years ago - perhaps it has improved, at least in RHEL 5.

MK
MK
Tim Nelson
Honored Contributor

Re: Move data to a new LUN

pvmove might also be a simpler option..

it creates the mirror and then removes it for you...


man pvmove