You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Increase Diskspace in Proxmox and Make All the Available Free Space Usable in a Ubuntu Linux VM
Steps
Shutdown VM
In Proxmox, select the VM you would like to add disk space to.
Select the Hardware tab.
Click on the Hard Disk you want to resize.
Click Disk Action (above all the hardware details) then Resize.
Enter the amount of space you would like to increase the disk by. (This is additive. If your disk is currently 32GB and you want it to be 64GB, you would need to add 32GB.)
Start the VM.
Terminal to VM and Login
Drop to Sudo:
sudo su
Check for Free Space
Run:
df -h
Nothing should have changed at this point.
Resize the Disk
Run:
cfdisk
At the bottom of the list, you should see ">> Free space". This will be equal to the amount you added to your disk above.
Select the partition you would like to resize (something like /dev/sda3you will need this in the next step).
Select RESIZE and hit ENTER.
The new size will use the entire amount of free disk space by default, hit ENTER.
Click WRITE, then type 'yes', and press ENTER to commit the change.
You should no longer see the ">> Free space" in the list.
Press 'q' or select Quit.
Extend the Partition
Run:
pvresize {Volume}
{Volume} will be the device you resized in cfdisk (something like /dev/sda3).
Check Volume Group for Free Space
Run:
vgdisplay
Get the LV Path
Run:
lvdisplay
Copy the LV Path.
Extend the Volume
Run:
lvextend -l +100%FREE {LVPath}
{LVPath} will be something like /dev/ubuntu-vg/ubuntu-lv.
Confirm Changes
Run:
lvdisplay
Get Root File System Path
Run:
df -h
Copy the /dev/mapper full path.
Resize Root File System
Run:
resize2fs {RootFSPath}
{RootFSPath} was copied in the previous step and should be something like /dev/mapper/ubuntu--vg-ubuntu--lv.
Confirm Changes
Run:
df -h
Optional: Reboot the Newly Resized VM
About
Easily resize your Proxmox disk and make all the new space available in a Ubuntu Linux VM with this guide. Follow step-by-step instructions to increase disk space and ensure your VM utilizes the additional storage efficiently. Perfect for Proxmox users looking to optimize their virtual machine storage.