- 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.
- Drop to Sudo:
sudo su
- Run:
Nothing should have changed at this point.
df -h
- 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/sda3
you 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.
- Run:
pvresize {Volume}
{Volume}
will be the device you resized incfdisk
(something like/dev/sda3
).
- Run:
vgdisplay
- Run:
lvdisplay
- Copy the LV Path.
- Run:
lvextend -l +100%FREE {LVPath}
{LVPath}
will be something like/dev/ubuntu-vg/ubuntu-lv
.
- Run:
lvdisplay
- Run:
df -h
- Copy the
/dev/mapper
full path.
- Run:
resize2fs {RootFSPath}
{RootFSPath}
was copied in the previous step and should be something like/dev/mapper/ubuntu--vg-ubuntu--lv
.
- Run:
df -h