lvextend(8)
Extend the size of a logical volume on a Linux LVM system.
Synopsis
lvextend [OPTION]... [--size +SIZE] LogicalVolume [PhysicalVolume...]Description
lvextend grows the size of a logical volume by allocating additional extents from available physical volumes in the volume group. It's commonly used to expand filesystems when disk space runs low, without requiring downtime or data migration.
After extending a logical volume, the underlying filesystem must also be resized (using resize2fs, xfs_growfs, or similar) to use the new space. Some filesystems support online resizing while mounted.
Common options
| Flag | What it does |
|---|---|
-L +SIZE | Extend by SIZE (e.g., +5G, +100M); use + to add to current size |
-l +EXTENTS | Extend by number of logical extents instead of size |
-i | Interactive mode; ask for confirmation before extending |
-r, --resizefs | Automatically resize the filesystem after extending the LV |
-f, --force | Force the operation without prompting for confirmation |
--type TYPE | Specify logical volume type (linear, striped, mirror, etc.) |
-v, --verbose | Show additional details during the extend operation |
--poolmetadatasize SIZE | Set or extend thin pool metadata size |
Examples
Extend logical volume 'data' in 'vg0' by 5 gigabytes
lvextend -L +5G /dev/vg0/dataExtend logical volume to exactly 50GB total size
lvextend -L 50G /dev/vg0/dataExtend by 10GB and automatically resize the ext4/xfs filesystem
lvextend -L +10G -r /dev/vg0/rootExtend by 100 logical extents using physical volume /dev/sdb2
lvextend -l +100 /dev/vg1/backup /dev/sdb2Extend by 1GB, pulling extents from two specific physical volumes
lvextend -L +1G /dev/vg0/media /dev/sdc1 /dev/sdd1Extend and resize filesystem, then verify with df
lvextend -r -L +2G /dev/mapper/vg0-home && df -h /home