How to Resize a Partition on a Linux Virtual Machine using LVM

1. Check the current disk utilization:
df -h

2. Increase the virtual disk size in vmWare

3. Mount the gParted ISO to the VM and set to automatically connect on boot

4. Reboot the VM

5. Use gParted to resize the partition. When done, change the CD/DVD drive back to client device and reboot.

6. Display the available free space:
Note the “Free PE / Size” – in my case 640 / 20.00 GiB

7. Extend the Volume Group by the number of extents noted in the previous step:
lvextend /dev/mapper/VolGroup00-LogVol00 --extents +640
Note the two dashes in front of the word “extents” in the previous command

8. Resize the volume:
resize2fs /dev/mapper/VolGroup00-LogVol00

9. Confirm the resize was successful:
df -h

10. Done!


Leave a Reply

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