These description is written for Ubuntu Linux. With a bit of creativity it should also work for other Linux flavours.
For all resize operations it is mandatory to stop running applications. Most reduce operations expect unmounted filesystems too.
Suppose you have a cluttered (physical) disklayout, i.e a number of small disk added over the course of time to extend the logical volume. Sometimes it’s convenient to consolidated the small (virtual-) disk into a large one.
The general idea is to add one temporary large virtual disk that can contain all other volumes, move the the physical volumes to the temporary volume. Then delete the small partition and create a sufficiently large one. Eventually reserve extra space for expansion in the near future. Once the volume is created move the physical volume from temporary to the newly created one.
pvmove <source device> <destination temporary device>
vgreduce <volumegroup> <physical device>
pvremove <physical device>
pvcreate <physical device from step 5>
vgextend <volumegroup> <physical device>
pvmove <source temporary device> <destination device>
vgreduce <volumegroup> <temporary device>
pvremove <temporary device>
As the description of the steps above are very elementary, here is an step-by-step example of a space consolidation.
pvresize --setphysicalvolumesize <newsize>GB /dev/<physical volume>
<partnumber>
→ End