lvextend
lvextend is a command from the LVM2 package used to increase the size of a logical volume (LV) inside a volume group (VG) on Linux systems. It adjusts the LV’s virtual size and, if requested, can resize the mounted filesystem to match the new LV size.
- lvextend [options] LV_PATH: specify the target logical volume, e.g., /dev/vg/lv or /dev/mapper/vg-lv.
- -L, --size SIZE: set the new size or request a change by a signed amount, e.g., -L
- -l, --extents NUMBER: adjust by a number of extents, e.g., -l +100%FREE to use all free extents
- -r, --resizefs: resize the filesystem together with the LV extension (online resizing supported for many filesystems).
- Before extending, the VG must have sufficient free PE (physical extents). Use vgdisplay or vgfree to
- The operation can often be performed online if the filesystem and the underlying storage support online
- If -r is not used, you must run the appropriate filesystem resize command (for example, resize2fs
- lvextend does not create space by itself; you may need to extend the VG by adding a
Related: lvresize is a related form of the same operation, and the command is part of the