Almost everyone understands the benefits of LVM or the fact you can “grow” a drive while online. Now imagine that you have accidentally given one of your partitions 20Gb too much space. You have been monitoring the disk and can see that it should grow by 1% every 15 years, so rather than waste the space lets reclaim it.

Traditionally you would have to completely backup the partition, destroy it, recreate it, format it, restore the data and remount it. This often was a long a tedious process that can become rather drawn out. Made even more devastating when you accidentally create the new partition with the wrong size.

This is a thing of the past with LVM, so if your current implementation incorporates LVM and you want to reclaim some of that traditionally lost space, read on.

umount /home
e2fsck -f /dev/VolGroup00/HomeVol
resize2fs /dev/VolGroup00/HomeVol 10G
lvreduce -L10G /dev/VolGroup00/HomeVol
mount /dev/VolGroup00/HomeVol /home
df -h

The above commands will umount your home directory, force a check of the filesystem, shrink it to 10Gb in size, sort out LVM and remount the drive. Keeping in mind you will have to substitute /dev/VolGroup00/HomeVol and 10G for the appropriate values that are relevant for your installation.