[linux-lvm] alternative to pvmove on root volume

chris procter chris-procter at talk21.com
Thu Jan 28 20:11:00 UTC 2010

(resent, it didn't seem to come through last time)


I'm trying to migrate our servers from an old EVA to a
shiney new netapp san if possible without downtime. For most of the
volumes I can present in luns from the new san and use pvmove to juggle
the data around but several servers have the root volume on the EVA and
pvmove has a nasty habit of deadlocking the machine when used on root

I've been working on the technique mentioned on http://sources.redhat.com/lvm2/wiki/FrequentlyAskedQuestions   but after a bit of thought it seems it might be better to do the following:

0) add /dev/new_lun to the volume group
1) lvconvert -m 1 /dev/myvg/lvol00 /dev/new_lun
2) wait for the mirror to sync

now we have RAID1 mirror copy of lvol00 on /dev/old_lun and /dev/new_lun so:

3) lvconvert -m 0 /dev/myvg/lvol00 /dev/old_lun
the RAID in favour of new_lun and gets rid of the old leaving us with a
basic (non-mirrored) linear lvol entire on the new_lun.

4) Rinse and repeat for all the other lvols on old_lun   (which you can get from "dmsetup table")

5) vgreduce myvg /dev/old_lun

Its less elegant then pvmove but my initial testing seems to suggest it does actually work and doesn't cause deadlocks.

given that pvmove also works by mirroring I'm not convinced I haven't
just been lucky so far .  So does anyone have any ideas or even better
experiance on whether this is likely to work or am I setting myself up
for a world of pain if I try it on a live server?

All opinions and advice gratefully received :)



More information about the linux-lvm mailing list