LVM How to shrink a partition | reduce the size of a partition on linux lvm lvs vgs pvs linux centos redhat ubuntu

I built a linux system which was constructed using the default configuration, in regards to disk space allocation.

When the system was completed I was not happy with the result, so i needed to reduce the space of one partition and increase another.

This is an uncommon procedure, so I wanted to document and let you know its relatively low risk and easy to perform. 

Heres how.

Start off my getting a detailed display of the current setup.

To resize the partition we must first amount it, please ensure none of the applications have locked any files as it will not unmount.

The check its actually unmounted.

Reduce the space in LVM on home


Then resize home partition (Shrink), this will raise an error informing you that you need to e2fsck first.

Run it

Re run resized2fs

Once completed you can then mount the partition.

As you can see the size of home is now 10G


And we have 35G free on this volume.




Leave a Reply

Your email address will not be published. Required fields are marked *