🖥️ Ubuntu Virtual Machine Disk Expansion Runbook
This guide documents how to increase the disk size of an Ubuntu virtual machine hosted in Proxmox. It covers:
- Expanding the virtual disk in Proxmox
- Expanding partitions and filesystems inside Ubuntu
- Separate procedures for LVM and Non‑LVM systems
⚡ Quick Guide
Before choosing a workflow, identify your disk layout:
sudo lsblk
| If you see… | Example | Use… |
|---|---|---|
LVM volumes (ubuntu--vg-ubuntu--lv, /dev/mapper/...) |
/dev/sda3 → PV → VG → LV |
Path A: LVM Expansion |
A single root partition (/dev/sda1, /dev/vda1) with no LVM |
/dev/vda1 mounted on / |
Path B: Non‑LVM Expansion |
1️⃣ Increase the Virtual Machine Disk in Proxmox
| Step | Action | Notes |
|---|---|---|
| 1 | Shut down the VM | Ensure the VM is powered off |
| 2 | Go to Hardware tab | Select the VM in Proxmox |
| 3 | Select the disk → Disk Action → Resize | Enter the size increment in GiB |
| 4 | Click Resize Disk | Wait for the operation to complete |
⚡ Do not boot the VM until the resize is finished.
2️⃣ Expand the Disk Inside Ubuntu
After booting the VM, follow either Path A (LVM) or Path B (Non‑LVM).
🟩 Path A — LVM-Based Root Filesystem Expansion
(Use this if your root filesystem is on LVM.)
A.1 Verify Disk Layout
sudo lsblk
Example:
sda
├─sda1
├─sda2
└─sda3 → LVM PV
└─ubuntu--vg-ubuntu--lv → root filesystem
A.2 Grow the Partition
sudo growpart /dev/sda 3
A.3 Resize the Physical Volume
sudo pvresize /dev/sda3
A.4 Extend the Logical Volume
sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
A.5 Resize the Filesystem
sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
A.6 Verify the New Size
df -h
🟦 Path B — Non‑LVM Root Filesystem Expansion
(Use this if your root filesystem is a normal partition like /dev/vda1 or /dev/sda1.)
B.1 Verify Disk Layout
sudo lsblk
Example:
vda
├─vda1 / ← root filesystem (non‑LVM)
├─vda14
├─vda15 /boot/efi
└─vda16 /boot
B.2 Grow the Root Partition
Replace 1 with your actual partition number.
sudo growpart /dev/vda 1
B.3 Resize the Filesystem
For ext4 (Ubuntu default):
sudo resize2fs /dev/vda1
For XFS:
sudo xfs_growfs /
B.4 Verify the New Size
df -h
✅ Notes
- Always back up important data before resizing disks.
- LVM and non‑LVM workflows are not interchangeable.
- The correct path depends entirely on what
lsblkshows. - Step order matters:
- LVM: grow partition → pvresize → lvextend → resize filesystem
- Non‑LVM: grow partition → resize filesystem