LinuxCommandLibrary

lvextend

increases the size of a logical volume in LVM

TLDR

Extend to absolute size

$ sudo lvextend -L 120G logical_volume
copy
Extend by relative size
$ sudo lvextend -L +40G -r logical_volume
copy
Use all free space
$ sudo lvextend -l +100%FREE logical_volume
copy
Extend and resize filesystem
$ sudo lvextend -l +100%FREE -r logical_volume
copy

SYNOPSIS

lvextend [OPTIONS] LogicalVolume

DESCRIPTION

lvextend increases the size of a logical volume in LVM. It can extend by an absolute size, relative size, or percentage of available space. The underlying filesystem can be resized automatically.

PARAMETERS

-L, --size size

Specify new absolute size or relative increase (+size)
-l, --extents extents
Specify size in extents or percentage (%VG, %FREE, %PVS)
-r, --resizefs
Automatically resize the underlying filesystem
-n, --nofsck
Skip filesystem check before resize
--use-policies
Use thin pool autoextend policies

CAVEATS

Ensure sufficient free space in the volume group. The filesystem resize with -r only works for ext2/3/4 and XFS. For other filesystems, manual resize is required after extending. XFS can only grow, not shrink.

HISTORY

lvextend is part of LVM2, the Linux Logical Volume Manager, providing dynamic storage management.

SEE ALSO

lvm(8), lvresize(8), lvreduce(8), lvcreate(8)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community