How to extend or increase the size of LVM partitions

Share this article with your friends
facebooktwittergoogle_plusredditpinterestlinkedinmailfacebooktwittergoogle_plusredditpinterestlinkedinmail


LVM  stands for Logical Volume Manager. One of the biggest advantage of lvm partitions is  that we can extend  file-system size using lvextend command.

I am taking the example of /home partition which is lvm based , currently /home is of 5GB , We will extend the size to 7GB , means we have to  add 2GB space.

Steps to Extend the size of /home by 2GB

 

Step:1 Check the space using below command

lvm-partition

Step:2  After extending the size of /home by 2GB, it should be 7GB.

Umount /home partition using below command

 [root@localhost ~]# umount /home/ 
Step:3 Extent the size by 2GB
#lvextend –L +2G /dev/mapper/VolGroup-LogVol101
 Step:4 Use resize2fs to resize the ext2,ext3 & ext4 file system

resize2fs

Use e2fsck command to check the file system as shown below

e2fsck

Now Mount /home using mount command and check the space using df command

mount

Note : lvextend uses free space of the volume group for extending the size.To check the free size of volume group use vgs or vgdisplay command.


Share this article with your friends
facebooktwittergoogle_plusredditpinterestlinkedinmailfacebooktwittergoogle_plusredditpinterestlinkedinmail

You may also like...

Leave a Reply

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