Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a 7.9 TB logical volume formatted with XFS filesystem. I have 8 1 TB RAID devices as physical volumes, and 1 volume group that contains all of these devices. I have 2.5 TB free space on my logical volume. I'd like to remove 2 of the 1 TB devices from the volume group since I don't "need" them anymore. Reading the man page of pvmove, it seems like I would need to create at least 5.5 TB of space and pvmove everything from the current 1 TB volumes onto the new volumes, and then remove all 8 of the original volumes from the logical volume. This seems onerous. Any suggestions?

share|improve this question

There's no problem on the LVM side. Use lvreduce to shrink a volume group; obviously, if there's a filesystem on it, you mustn't shrink it below the size of the filesystem. Then use pvmove to shuffle extents around: pvmove /dev/sdz42 removes extents from the physical volume /dev/sdz42 to other physical volumes in the same volume group, after which you can decommission the physical volume with vgreduce.

However this is moot since you have an XFS filesystem, and XFS does not support shrinking. I'm afraid you'll have to move the data off and remake the filesystem (and thus you can be completely unsubtle with LVM).

share|improve this answer
Gilles, excellent, I just did not get the correct workflow! lvreduce does exactly what is required... and now I see that I have really hurt myself with XFS. – Steve Jul 7 '11 at 7:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.