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. 

We can resize the LVM partition using lvextend commands. We have shown you LVM steps with lvextend example to resize LVM 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 has 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

Check the space using the below commands.

df -Th 

Check Out:  Install and Configure S3CMD Tool For Data Sync On S3 Bucket

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  linux  group linux extend partition increase volume group size

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment