Applies to: An Ubuntu LVM disk using the device paths shown in this example and an ext4 file system.
Before you start
- Have a current, recoverable backup, console access and a maintenance plan. Confirm the exact disk, partition, PV, VG, LV and file-system type before changing storage.
- The example assumes a simple, non-encrypted, non-thin LVM layout using partition
/dev/sda3and LV/dev/ubuntu-vg/ubuntu-lv. Replace both with the verified paths. Other layouts need their own procedure.
Procedure
- Increase the underlying virtual or physical disk using its supported storage-management procedure.
- Open
cfdiskand check that Linux can see the additional disk space. If it cannot, use the rescan command below for the examplesdadisk. - In
cfdisk, select the partition to expand, choose Resize and write the new partition table. Preserve the start sector and partition type. Check the system recognises the new size before continuing. - Check and resize the physical volume, then use the volume-group display to confirm the free space is available.
- Find the intended logical-volume path and extend it. The original command uses
+100%FREEto allocate all remaining free space in its volume group. - Check the file-system path with
df -h, grow the ext4 file system withresize2fs, then rundf -hagain to confirm the new size.
Commands
1. Rescan the example disk
echo 1 > /sys/class/block/sda/device/rescan2. Display and resize the physical volume
sudo pvdisplay
sudo pvresize /dev/sda33. Check free space in the volume group
sudo vgdisplay4. Find the logical-volume path
sudo lvdisplay5. Extend the logical volume using the free space
sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv6. Check the file-system path and current size
df -h7. Resize the file system
In this example the file system is /dev/mapper/ubuntu--vg-ubuntu--lv.
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv8. Check the new file-system size
df -hCheck the result
- Confirm the expected free space and volume sizes in the output from
vgdisplay,lvdisplayanddf -h. - Check application reads and writes and backup health after the change.
Screenshots
These screenshots show the interface used for the original guide. Labels and available options may differ in your release.








