LVM – Pvmove And Multiple Servers

Home » CentOS » LVM – Pvmove And Multiple Servers
CentOS 3 Comments

Hi All.

Looking for some guidance/experience with LVM and pvmove.

I have a LUN/PV being presented from a iscsi SAN. The LUN/PV is presented to 5 servers as a shared VG they all have LV’s they use for data, they are all connected via iSCSI.

As the SAN I am using is being replaced I need to move onto a new unit.

My migration strategy at this time is to

1. Present a new LUN from the new SAN to all machines.
2. Make a PV with the new LUN.
3. Add it to the existing VG.
4. Use pvmove to move all the data from one PV to another.
5. Once the old LUN is empty, complete a pvresize to remove the old LUN.

This all seems sound but looking for advice, specifically around the fact that the VG/PV data is being used by a number of machines/servers and the LV’s are active on a number of different nodes.

All the documentation/examples I can find assume a disk in a server, not a LUN on a SAN being shared by a number of servers.

Any advice is appreciated.



3 thoughts on - LVM – Pvmove And Multiple Servers

  • Cannot help with the SAN question other than to say that you are just adding another PV block device to a VG and LVM shouldn’t care.

    My comment is on step 5. You want to “vgreduce -a ” to remove empty PVs (assuming only the old one is empty) followed by “pvremove ” to remove the old PV.

    As always, be wary of any “Are you sure?” or “You need to –force” LVM


  • only way I’d do that would be to shutdown the other 4 servers, redo the LVM, then bring the other 4 servers back up so they can discover the new LV/PV structures.