Running out of disk space on a virtual machine (VM) is a common challenge in virtualization environments. Thankfully, Proxmox Virtual Environment (PVE) makes it straightforward to extend a Linux VM’s disk, giving your workload more breathing room without downtime in most cases. In this guide, we’ll walk step by step through extending a Linux VM disk in Proxmox VE.


Why Extend a VM Disk?

There are many reasons why you may need to expand a virtual disk:

  • Application growth – databases, log files, or application data expanding over time.
  • Misallocation – initial disk size underestimated during VM creation.
  • Flexibility – allocating resources dynamically rather than overprovisioning at deployment.

Instead of migrating to a larger disk or provisioning a new VM, resizing the existing disk is often the fastest solution.


Step 1: Increase Disk Size in Proxmox

  1. Log into your Proxmox VE web interface.
  2. Select the VM you want to resize.
  3. Go to Hardware → Hard Disk (e.g., scsi0).
  4. Click Resize Disk.
  5. Enter the amount of space to add (for example, +50G to add 50GB).
  6. Click Resize.

At this stage, the VM’s virtual disk is bigger, but the guest operating system still sees the old size until we expand the partition and filesystem.


Step 2: Detect New Disk Size in Linux

Inside your Linux VM, log in via SSH or the Proxmox console and run:

lsblk

This lists all block devices. You should see your disk (e.g., /dev/sda or /dev/vda) with the new size, but the partition still matches the old size.

You can also confirm with:

fdisk -l

Step 3: Extend the Partition

If your root disk uses a single partition, you’ll need to grow it. There are two common scenarios:

Scenario A: VM uses LVM (Logical Volume Manager)

  1. Resize the partition:
growpart /dev/sda 3

(Replace /dev/sda 3 with your correct disk and partition number.)

  1. Resize the physical volume:
pvresize /dev/sda3
  1. Extend the logical volume:
lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
  1. Resize the filesystem:
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv

or, for XFS filesystems:

xfs_growfs /

Scenario B: VM uses a simple partition (no LVM)

  1. Use growpart (from cloud-guest-utils package) to expand the partition:
growpart /dev/sda 1
  1. Resize the filesystem:

For ext4:

resize2fs /dev/sda1

For XFS:

xfs_growfs /

Step 4: Verify the Expansion

Check the new space:

df -h

You should now see your root filesystem (or whichever mount point you extended) reflecting the additional space.


Best Practices

  • Backup first: Always snapshot or back up your VM before modifying partitions.
  • Use LVM or ZFS: These provide more flexibility in managing disk growth.
  • Plan storage: Regularly monitor VM disk usage so you can resize proactively.

Conclusion

Extending a Linux VM disk on Proxmox VE is a straightforward process: resize the disk in the Proxmox UI, then expand the partition and filesystem inside the VM. With LVM or modern filesystems like XFS, the process is even smoother and can often be done online without downtime.

By following these steps, you’ll avoid storage bottlenecks and keep your Linux VMs running efficiently.