Really handy if you have done a proof of concept box and a colleague decides to push the VM into production. Assuming you have already resized the disk in the hypervisor lets start -
Get the OS to detect the new disk size (substitute 'sda' for whatever disk you are resizing)
Then I like to take a look at the disks using
Select (most likely) /dev/sda3 partition from the list and then select “Resize” from the bottom menu. Hit ENTER and it will prompt you to confirm the new size. Hit ENTER again and you will now see the /dev/sda3 partition with a new larger size.
Select “Write” from the bottom menu, type YES to confirm, and hit ENTER. Then use "Quit" to exit the program.
Now that /dev/sda3 has been extended we now need to extend the PV itself. Run
and check with
We can check the overall volume group size and space using
Mind how I told you it was a POC box? Well using the default Ubuntu names we now need to extend the Logical Volume (LV) using
Change the names as needed for your Volume Group/Logical Volume and check with
So thats all good and well, but wait, theres more! The logical volume has been extended but we need the file system that resides on it to be extented.
Final check with
Should show all that lovely new free disk space.