[CentOS] LVM - pvmove and multiple servers

S.Tindall

tindall.satwth at brandxmail.com
Sat Jan 10 18:13:45 UTC 2015


On Sun, 2015-01-11 at 00:13 +1100, Daniel Hoffman wrote:
> 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.

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 <VG>" to remove empty
PVs (assuming only the old one is empty) followed by "pvremove <PV>" to
remove the old PV.

As always, be wary of any "Are you sure?" or "You need to --force" LVM
output.

Steve




More information about the CentOS mailing list