Expand an LVM Disk (Ubuntu)

Servers & Storage

2 min readIntermediateLast updated Oct 29, 2026

Use this after making a disk bigger, for example after growing a VM's virtual disk in Proxmox or VMware, enlarging a VPS disk, or cloning onto a larger physical drive. Linux does not use the new space until you grow each layer: disk → partition → physical volume → logical volume → filesystem.

The examples use a default Ubuntu Server layout (/dev/sda3 holding volume group ubuntu-vg). Your device names may differ, so check them first.

1

Grow the disk

Increase the disk size in your hypervisor or hosting panel. If the VM doesn't see the new size without a reboot, rescan the disk (replace sda with your disk):

echo 1 | sudo tee /sys/class/block/sda/device/rescan
2

Check the layout

lsblk
sudo pvs; sudo vgs; sudo lvs

Note three things: the disk (e.g. sda, vda, nvme0n1), the partition number that holds LVM (e.g. 3), and the logical volume path (e.g. /dev/ubuntu-vg/ubuntu-lv).

3

Grow the partition

sudo apt install cloud-guest-utils   # provides growpart, if missing
sudo growpart /dev/sda 3

Note the space between the disk and the partition number. For NVMe disks it is still growpart /dev/nvme0n1 3.

4

Grow the physical volume

sudo pvresize /dev/sda3

On NVMe the partition is /dev/nvme0n1p3. If pvresize reports no change, it was already resized and you can move on.

5

Grow the logical volume and filesystem

sudo lvextend -r -l +100%FREE /dev/ubuntu-vg/ubuntu-lv

-r resizes the filesystem as well (ext4 and XFS), so no extra step is needed. To do it manually instead, run lvextend without -r and then:

# ext4
sudo resize2fs /dev/ubuntu-vg/ubuntu-lv
# XFS (RHEL, Rocky, Alma) – takes the mount point
sudo xfs_growfs /
6

Confirm

df -h /

The size should now match the new disk, minus the boot partitions.

Troubleshooting

  • growpart says NOCHANGE – the partition already fills the disk, or the OS hasn't seen the new disk size yet. Rerun the rescan in step 1 or reboot.
  • lvextend says "no free extents" – the physical volume wasn't resized. Recheck step 4 with sudo pvs.
  • Disk uses a GPT layout and growpart warns about the backup header – this is normal after growing a disk. growpart fixes it automatically.

Article information

Category
Servers & Storage
Read time
2 minutes
Difficulty
Intermediate
Last updated
Oct 29, 2026