$linuxjunkies
>

lvextend(8)

Extend the size of a logical volume on a Linux LVM system.

UbuntuDebianFedoraArch

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

FlagWhat it does
-L +SIZEExtend by SIZE (e.g., +5G, +100M); use + to add to current size
-l +EXTENTSExtend by number of logical extents instead of size
-iInteractive mode; ask for confirmation before extending
-r, --resizefsAutomatically resize the filesystem after extending the LV
-f, --forceForce the operation without prompting for confirmation
--type TYPESpecify logical volume type (linear, striped, mirror, etc.)
-v, --verboseShow additional details during the extend operation
--poolmetadatasize SIZESet or extend thin pool metadata size

Examples

Extend logical volume 'data' in 'vg0' by 5 gigabytes

lvextend -L +5G /dev/vg0/data

Extend logical volume to exactly 50GB total size

lvextend -L 50G /dev/vg0/data

Extend by 10GB and automatically resize the ext4/xfs filesystem

lvextend -L +10G -r /dev/vg0/root

Extend by 100 logical extents using physical volume /dev/sdb2

lvextend -l +100 /dev/vg1/backup /dev/sdb2

Extend by 1GB, pulling extents from two specific physical volumes

lvextend -L +1G /dev/vg0/media /dev/sdc1 /dev/sdd1

Extend and resize filesystem, then verify with df

lvextend -r -L +2G /dev/mapper/vg0-home && df -h /home

Related commands