Resize or Extend Linux VG or LV

If you are needing to add more space to an LV but your VG has no space left to give to the LV.  Following the below will extend or resize your VG and LV in Redhat/CentOS linux.

1) Add a new disk to linux machine.  In VMware, you would just edit the system settings and add another disk.

2) Add the new disk to the existing VG: vgextend /dev/vg01 /dev/sdc

3) Now your Volume Group has the new space added.  You can confirm by doing a vgdisplay.

4) Add space to the existing LV. In the example, I am adding 50 G to the LV from the 100 G disk I added to the VG: lvextend -L +50G /dev/lv01

5) Last thing, do an on-line resize: resize2fs /dev/vg01/lv01
You should now have extended your logical volume.


, , , , ,

Comments are closed.