Ubuntu 26.04 Tutorial / Inspect the Disk and LVM Layout Before Expansion

Before expanding Ubuntu storage, identify which layer has free capacity: virtual disk, partition, LVM, or filesystem. Increasing disk capacity is separate from expanding the root filesystem. Establish backups and the actual target first.

Map the storage layers to actual output

lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS
findmnt /
df -hT /
sudo pvs
sudo vgs
sudo lvs -o lv_path,lv_size,vg_name

An installation without LVM may have no relevant pvs, vgs, or lvs entries. With LVM, a PV supplies block storage, a VG pools capacity, and an LV supplies a logical device for the filesystem. Match the root source to its actual LV path.

Where space exists Potential next operation
Free space in the VG Extend an existing LV and supported filesystem
Disk grew but PV did not Review partition and PV boundaries before LV work
An additional disk Separate identification, backup, PV, and VG planning
Only filesystem appears full Also inspect large files, logs, and inodes

Compare installer choices with current capacity

Guided LVM installation may leave capacity outside the root LV. If df reports less than the virtual disk size, inspect free VG space first. Repeating lvextend cannot create capacity in a full VG.

Ubuntu’s LVM management guide explains volume layers and logical-volume expansion requirements.

Confirm the target and recovery plan

Open independently stored backups and prepare a known-good VM state and console access. Record device, mount, filesystem, free VG space, and planned growth. Expansion is not safely reversed by a simple opposite command; do not assume shrinking is a rollback method.

The example below applies only to a dedicated lab where the actual LV is exactly /dev/ubuntu-vg/ubuntu-lv, the filesystem is supported ext4, and the VG has at least 1 GiB free. Use the verified path and support conditions for any other environment.

Perform a bounded expansion using VG space

sudo lvextend --size +1G --resizefs /dev/ubuntu-vg/ubuntu-lv
sudo lvs -o lv_path,lv_size,vg_name
df -hT /
findmnt /

+1G adds capacity; it differs from an absolute 1G target. resizefs requests supported filesystem resizing too, but verify both LV and filesystem sizes. If only the LV grew, investigate rather than blindly repeating the command.

Plan other-layer changes separately

Partition growth, PV resizing, and adding disks require device-specific procedures. Do not copy pvcreate onto a disk containing data or format the root device. Map the current and constrained layers and write expected capacities before changing them.

Afterwards, test real reads and writes, services, and a planned reboot. If errors occur, stop additional changes, retain logs and layout evidence, and assess the prepared backup-restoration route. Increased capacity and recoverable data are separate outcomes.