Just provisioned a new Ubuntu 24.04 LTS instance and allocated a 500 GiB disk? You run df -h only to find that the rootfs / is capped at a meager ~90 GiB.

Don’t panic – your disk space didn’t vanish. The root cause is Ubuntu’s default installer configures LVM but conservatively allocates only a portion of the Volume Group (VG) to the Logical Volume (LV) by default. The rest is just left here unallocated.
Here is the clean, 2-step production-safe combo to stretch your root partition to 100% of the actual disk capacity instantly.
# Step 1: Extend the Logical Volume to comsume 100% of the remaining free VG space.
sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg--ubuntu--lv
# Step 2: Resize the ext4 filesystem online to occupy the expanded container.
sudo resize2fs /
# Step 3: Verify the new layout.
df -hNow we can see the latest layout where the 100% free VG space is fully leveraged.

Why this matters under the hood:
- Separation of Concerns:
lvextendscales the logical container (LVM layer), whileresize2fsscales the actual data structure (Filesystem layer). - Zero Downtime: This process supports online resizing. You do not need to unmount
/or restart any running services, making it perfectly safe for live development or staging nodes.
Note: Ubuntu 24.04 defaults to ext4 for standard installations. If your custom stack uses XFS, swap Step 2 with sudo xfs_growfs /.