How To Extend LVM For Volume Group Size On Linux

How To Extend LVM For Volume Group Size On Linux

As you can see I have already created an LVM and mounted on /root/vol and now I need to increase the space but there’s no more space left in Volume Group. Let’s see, how to extend or increase LVM size for volume group partition size in Linux.

Check Out: LDAP Authentication With Gitlab Server Using Active Directory

we can only increase the size of the directory when we have space left in the volume group. 

I have added an additional disk size of 1GB.

volume group extend linux

You can see the size of the volume group using vgs. No free size is available.

extend volume group

we need to create the physical volume.

pvcreate /dev/sdc

Check Out: How To Create CSR Certificate File Using Command On Linux

Now increase the volume group. you just have to run a single command and size will be increased.

vgextend vg /dev/sdc

linux extend partition

you can see the free space almost 1GB left and volume size have been increased.

Check Out: How To Display Timestamp In History Command On Linux

We will increase the size of the vol directory using the lvextend.

lvextend -L +900MB /dev/vg/lv_vg 

we can see the logical volume size using lvs but you can see the size of vol not increased because you have to resize the size using the below commands.

increase volume group size

df -Th 

you need to run the below command to resize the partition.

resize2fs /dev/mapper/vg-lv_vg

As you can see now size increased to 1.8 GB.

You’re done

About Helios Smith

Author is a avid reader

Latest Posts
Follow Us
Get the latest news delivered daily!