A short reference for when a Linux VM running under Proxmox runs out of disk space. This assumes the guest was set up with LVM (the common default for Debian/Ubuntu installs) and that you’ve already grown the virtual disk in the Proxmox UI.
Step 0 — Grow the disk in Proxmox
Select the VM, go to Hardware, select the disk, and use Disk Action → Resize to add space. This only enlarges the virtual disk; the guest OS still needs to be told to use the new space.
Step 1 — Check the current layout (inside the guest)
lsblk
df -hT /
sudo vgs
sudo lvs
Note your disk (e.g. /dev/sda), the partition number, and the logical volume path (e.g. /dev/ubuntu-vg/ubuntu-lv). Adjust the commands below to match your own output.
Step 2 — Grow the partition
sudo growpart /dev/sda 3
If growpart isn’t installed, grab it from cloud-guest-utils (Debian/Ubuntu) or cloud-utils-growpart (RHEL). If the kernel doesn’t see the larger disk yet, a reboot or a SCSI rescan will sort it out.
Step 3 — Resize the LVM physical volume
sudo pvresize /dev/sda3
Step 4 — Extend the logical volume
To use all of the newly available free space:
sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
Step 5 — Grow the filesystem
Check the filesystem type with df -hT /, then:
- ext4:
sudo resize2fs /dev/ubuntu-vg/ubuntu-lv - xfs:
sudo xfs_growfs /(xfs grows by mount point, not device)
Tip: combine the last two steps
Steps 4 and 5 can be done in one go with the -r flag, which resizes the filesystem at the same time:
sudo lvextend -r -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
Step 6 — Verify
df -h /
All of this works online — no unmount or downtime needed for ext4 or xfs root filesystems.