Logical Volume Management "pvmove" Question
Apologies in advance if this is not the right forum, but I can't figure out where else to ask this.
I'm in an argument with another Linux user and we're disagreeing on how PVMOVE works. Say you have a 4 500G disk (linear (non-striped)) volume which currently has 700Gigs of free space. I thought I could run pvmove to remove one of the disks and pvmove would copy that device's contents (if any) to free space anywhere. My friend believes that pvmove moves data to an unassigned disk. So I'd have to first add a new disk then do the pvmove.
One of the disks in my batch of 4 has gone faulty and I'm trying to remove it from the volume before I add a replacement, (I've had problems with this in the past but that's a subject for a diff question) so it's rather hard for me to try both methods. So I'm wondering if someone on this board knows for sure.
I have used pvmove (RHEL4 mostly but also RHEL5) at least a dozen times.
You'll need enough storage on disks other than the one you are moving extents off of.
say you have 4 disks each with one partition that is Linux LVM (sd[bcde]1) and sdc is the one going south on you and you have enough free PEs on on the remaining 3 disks to move the extents from sdc1.
NOTE: you can use lvdisplay's "--maps" option to identify where the LogicalVolume's extents are located to confirm before and/or after
you can view the progress by running pvmove with the -i <seconds> option to see how much longer you have to wait ;) so my typical invocation of this entire process looks something like this
then once the pvmove has been successfully completed, confirm that no LV extents are on sdc1, proceed with vgreduce, pvremove, ...
if you want to move all extents to a specific PV in the VG then you can specify it in your pvmove, otherwise, it'll move to any available extents on any of the other PVs.
If you have enough extents available on other PVs in this VG you may successfully use pvmove without adding another PV to this VG.
If you do not have enough extents available on the other PVs in this VG you will need to either free up extents (deleting/reducing LVs) or create more extents by adding PV(s)
jamida's the winner of the argument, no?
|All times are GMT -5. The time now is 04:31 PM.|