A common surprise after installing Ubuntu Server: a 100 GB disk, but df -h shows a root filesystem of about half that. The installer created an LVM volume group across the whole disk but only allocated part of it to the root logical volume. The rest is free – you just need to assign it.
Step 1 – See the real free space
df only shows what is allocated to filesystems. To see the whole volume group, use vgdisplay:
sudo vgdisplay- VG Size – total space in the volume group.
- Alloc PE / Size – space already given to logical volumes.
- Free PE / Size – unallocated space you can use.


Step 2 – Find the logical volume path
sudo lvdisplayOn a default install the root volume is /dev/ubuntu-vg/ubuntu-lv.

Step 3 – Extend the volume and filesystem
sudo lvextend -r -l +100%FREE /dev/ubuntu-vg/ubuntu-lv-l +100%FREE uses all remaining space (use +50%FREE to keep some in reserve). -r resizes the filesystem in the same step. Both work online – no reboot or unmount.

Already ran lvextend without -r? Grow the ext4 filesystem separately:
sudo resize2fs /dev/mapper/ubuntuu002du002dvg-ubuntuu002du002dlv
Step 4 – Confirm
df -h /Added a new virtual disk instead?
If you enlarged the virtual disk in VMware or Hyper-V, first grow the partition (sudo growpart /dev/sda 3) and the physical volume (sudo pvresize /dev/sda3), then run the lvextend command above.
Back up first
Resizing is routine, but take a snapshot or backup before changing storage on a production server. XFS filesystems can only grow (use xfs_growfs); none of these commands shrink a volume.

