Tag Archives: vgs

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.

Enjoy!

 

 

Howto resize full disk partitions with LVM | lvm vgs pvs lvs redhat resize2fs centos filesystem

One of the most common tasks that I have been performing lately is disk resize, especially in environment which have not been planned well and taking the application into account.

This was the procedure I performed the other day when an incident was raised.

 

Find the problem.

 

Find out if LVM and the volume group has available space.

Confirm the logical volume name.

Issue the command to extend.

Issue the command to resize the file system.

Confirmation it has taken affect.