You expanded the disk in your hypervisor. Now the OS has no idea. Here is how to claim that space without rebooting.
This comes up constantly in homelab and production environments. You have a VM running Ubuntu with LVM, the root volume is full or getting close, so you go into Proxmox, VMware, or Hyper-V and expand the virtual disk. Then you SSH in and df -h still shows the same size. Nothing changed on the OS side because expanding the disk in the hypervisor is only the first half of the job.
This guide covers the second half. All steps run on a live, mounted root volume with no downtime required.
Prerequisites
- The disk has already been expanded in your hypervisor
- You have sudo access on the server
- The
cloud-guest-utilspackage is installed
If it is not installed:
sudo apt install cloud-guest-utils
Step 1: Rescan the Disk
Tell the OS to reread the partition table after the hypervisor-side resize:
sudo partprobe /dev/sda
You may see a warning that not all available space is being used. That is expected. It confirms the new space is visible but not yet claimed.
Step 2: Fix the GPT Partition Table
Move the backup GPT header to the end of the expanded disk. This is required before the partition can be grown:
sudo sgdisk -e /dev/sda
Step 3: Confirm the Layout
Check your partition layout before making changes:
sudo lsblk
Confirm which partition holds your LVM physical volume. On a standard Ubuntu install it is typically sda3.
Step 4: Grow the Partition
Extend the partition to use the available unallocated space:
sudo growpart /dev/sda 3
Replace 3 with your actual partition number if it differs from the output you saw in Step 3.
Step 5: Resize the Physical Volume
Tell LVM about the newly available space:
sudo pvresize /dev/sda3
You can verify it worked at any point with:
sudo pvs
sudo vgs
Step 6: Extend the Logical Volume
Extend the logical volume to consume all free space in the volume group:
sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
Step 7: Resize the Filesystem
Resize the filesystem to fill the expanded logical volume. This runs live with no unmounting:
sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
This command is for ext4, which is the default on Ubuntu LVM installs. If your filesystem is XFS, use sudo xfs_growfs / instead.
Step 8: Verify
Confirm the partition and logical volume reflect the new size:
sudo lsblk
Before:
sda3 8:3 0 48G 0 part
└─ubuntu--vg-ubuntu--lv 252:0 0 48G 0 lvm /
After:
sda3 8:3 0 78G 0 part
└─ubuntu--vg-ubuntu--lv 252:0 0 78G 0 lvm /
If you want to confirm the filesystem itself sees the new space, run:
df -h /
lsblk shows block device and partition sizes. df -h shows how much space the mounted filesystem reports as available. Both should reflect the expansion. If lsblk shows the new size but df -h does not, the resize2fs step did not complete successfully.
Adding a New Disk Instead
If you are adding a brand new disk rather than expanding an existing one, the process is slightly different. After the new disk appears (e.g. /dev/sdb), initialize it as an LVM physical volume and add it to the volume group before running the lvextend step:
sudo pvcreate /dev/sdb
sudo vgextend ubuntu-vg /dev/sdb
Then continue from Step 6.
Your Turn
If you ran into a step that behaved differently on your setup, drop it below. Ubuntu installs vary depending on how the VM was provisioned, and partition numbers or device names may differ. If something did not match, say what you saw and someone here will likely know why.

