LVEXTEND(8)

๐Ÿ’– lvextend ๐Ÿ’– โ€” the glow-up epic, straight outta the System Manager's Manual

okay bestie, sit DOWN. this is lvextend from section 8 of the manual, and it's literally the "make my logical volume BIGGER" button. no cap.


โœจ NAME โœจ

lvextend โ€” Add space to a logical volume ๐Ÿซถ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

lvextend option_args position_args
       [ option_args ]
       [ position_args ]

        --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
     -A|--autobackup y|n
        --commandprofile String
        --config String
     -d|--debug ...
        --devices PV
        --devicesfile String
        --driverloaded y|n
     -l|--extents [+]Number[PERCENT]
     -f|--force ...
        --fs String
        --fsmode String
     -h|--help
        --journal String
        --lockopt String
        --longhelp
     -m|--mirrors Number
     -n|--nofsck
        --nohints
        --nolocking
        --nosync
        --noudevsync
        --poolmetadatasize [+]Size[m|UNIT]
        --profile String
     -q|--quiet ...
        --reportformat basic|json|json_std
     -r|--resizefs
     -L|--size [+]Size[m|UNIT]
     -i|--stripes Number
     -I|--stripesize Size[k|UNIT]
     -t|--test
        --type linear|striped|snapshot|raid|mirror|thin|thin-pool|vdo|
     vdo-pool|cache|cache-pool|writecache
        --usepolicies
     -v|--verbose ...
        --version
     -y|--yes

๐ŸŽ€ DESCRIPTION ๐ŸŽ€

so, lvextend extends the size of an LV. it's giving main character growth arc. but plot twist: this requires allocating logical extents from the VG's free physical extents. like, you can't just manifest it, the space has to actually exist. the way that works is โ€” if the extension adds a new LV segment, the new segment will use the existing segment type of the LV. periodt.

extending a copy-on-write snapshot LV adds space for COW blocks. yes bestie, snapshots need room to breathe too ๐Ÿ’…

๐Ÿ“Œ use lvconvert(8) to change the number of data images in a RAID or mirrored LV. that's a different tool for a different job, don't come for lvextend for that.

also lowkey important: in the usage section below, --size Size can be replaced with --extents Number. see both descriptions in the options section. they're two doors to the same room, iykyk.


๐ŸŒˆ USAGE ๐ŸŒˆ

extend an LV by a specified size

lvextend -L|--size [+]Size[m|UNIT] LV
       [ -l|--extents [+]Number[PERCENT] ]
       [ -i|--stripes Number ]
       [ -I|--stripesize Size[k|UNIT] ]
       [ -r|--resizefs ]
       [ --fs String ]
       [ --fsmode String ]
       [ --poolmetadatasize [+]Size[m|UNIT] ]
       [ COMMON_OPTIONS ]
       [ PV ... ]

โ€”

extend an LV by specified PV extents

lvextend LV PV ...
       [ -i|--stripes Number ]
       [ -I|--stripesize Size[k|UNIT] ]
       [ -r|--resizefs ]
       [ --fs String ]
       [ --fsmode String ]
       [ COMMON_OPTIONS ]

โ€”

extend a pool metadata SubLV by a specified size

lvextend --poolmetadatasize [+]Size[m|UNIT] LV1
       [ -i|--stripes Number ]
       [ -I|--stripesize Size[k|UNIT] ]
       [ COMMON_OPTIONS ]
       [ PV ... ]

       LV1 types: linear thinpool

โ€”

extend an LV according to a predefined policy

lvextend --usepolicies LV1
       [ -r|--resizefs ]
       [ --fs String ]
       [ --fsmode String ]
       [ COMMON_OPTIONS ]
       [ PV ... ]

       LV1 types: snapshot thinpool vdopool

๐Ÿงš common options for command

[ -A|--autobackup y|n ]
[ -f|--force ... ]
[ -m|--mirrors Number ]
[ -n|--nofsck ]
[ --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
]
[ --nosync ]
[ --noudevsync ]
[ --reportformat basic|json|json_std ]
[ --type linear|striped|snapshot|raid|mirror|thin|thin-pool|vdo|
vdo-pool|cache|cache-pool|writecache ]

โญ common options for lvm

[ -d|--debug ... ]
[ -h|--help ]
[ -q|--quiet ... ]
[ -t|--test ]
[ -v|--verbose ... ]
[ -y|--yes ]
[ --commandprofile String ]
[ --config String ]
[ --devices PV ]
[ --devicesfile String ]
[ --driverloaded y|n ]
[ --journal String ]
[ --lockopt String ]
[ --longhelp ]
[ --nohints ]
[ --nolocking ]
[ --profile String ]
[ --version ]

โœจ OPTIONS โœจ

  • --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit โ€” this decides the allocation policy when a command needs to pull Physical Extents (PEs) out of the VG. every VG and LV has its own allocation policy, and you can change it with vgchange/lvchange, or override it right here on the command line. quick rundown bestie:
    • normal = the common sense queen. applies rules like "don't put parallel stripes on the same PV."
    • inherit = applies the VG policy to an LV.
    • contiguous = new PEs gotta be placed adjacent to existing PEs. no gaps, we're neat here.
    • cling = new PEs go on the same PV as existing PEs in the same stripe of the LV.
    • cling_by_tags = also in the list, we don't gatekeep.
    • anywhere = if there are sufficient PEs for an allocation but normal won't use them, anywhere WILL use them, even if it tanks performance, e.g. by placing two stripes on the same PV. blessed but risky ๐Ÿ’€

optional positional PV args on the command line can also limit which PVs the command will use for allocation. see lvm(8) for more info about allocation.

  • -A|--autobackup y|n โ€” says whether metadata should be backed up automatically after a change. enabling this is strongly advised! fr fr do it. see vgcfgbackup(8) for more.
  • --commandprofile String โ€” the command profile to use for command config. see lvm.conf(5) for the tea on profiles.
  • --config String โ€” config settings for the command. these override lvm.conf(5) settings. the String arg uses the same format as lvm.conf(5), or may use section/field syntax. see lvm.conf(5) for more about config.
  • -d|--debug ... โ€” set the debug level. repeat from 1 to 6 times to increase the detail of messages sent to the log file and/or syslog (if configured). more -ds, more lore ๐Ÿ”
  • --devices PV โ€” restricts the devices that are visible and accessible to the command. devices not listed will appear to be missing ๐Ÿ‘ป this option can be repeated, or accepts a comma-separated list of devices. this overrides the devices file.
  • --devicesfile String โ€” a file listing devices that LVM should use. the file must exist in /etc/lvm/devices/ and is managed with the lvmdevices(8) command. this overrides the lvm.conf(5) devices/devicesfile and devices/use_devicesfile settings.
  • --driverloaded y|n โ€” if set to no, the command will not attempt to use device-mapper. for testing and debugging. it's giving lab coat energy ๐Ÿงช
  • -l|--extents [+]Number[PERCENT] โ€” specifies the new size of the LV in logical extents. the --size and --extents options are alternate methods of specifying size. heads up: the total number of physical extents used will be greater when redundant data is needed for RAID levels (redundancy costs space, that's just math bestie).

there's an alternate syntax that lets the size be determined indirectly as a percentage of the size of a related VG, LV, or set of PVs:

  • suffix %VG = the total size of the VG
  • suffix %FREE = the remaining free space in the VG
  • suffix %PVS = the free space in the specified PVs
  • for a snapshot, the size can be expressed as a percentage of the total size of the origin LV with the suffix %ORIGIN (100%ORIGIN provides space for the whole origin)

when expressed as a percentage, the size defines an upper limit for the number of logical extents in the new LV. the precise number of logical extents in the new LV is not determined until the command has completed. so don't @ it with exact numbers, it's doing its best โœจ

when the plus + or minus - prefix is used, the value is not an absolute size, but is relative and added or subtracted from the current size.

  • -f|--force ... โ€” override various checks, confirmations and protections. use with extreme caution. like, this one has no chill and neither should you ๐Ÿ™ˆ
  • --fs String โ€” controls file system resizing when resizing an LV. the menu:
    • checksize: check the fs size and reduce the LV if the fs is not using the reduced space (fs reduce is not needed.) if the reduced space is used by the fs, then do not resize the fs or LV, and return an error. (checksize only applies when reducing, and does nothing for extend.)
    • resize: resize the fs by calling the fs-specific resize command. this may also include mounting, unmounting, or running fsck. see --fsmode to control mounting behavior, and --nofsck to disable fsck.
    • resize_fsadm: use the old method of calling fsadm to handle the fs (deprecated.)
Warning: this option does not prevent lvreduce from destroying file systems that are unmounted (or mounted if prompts are skipped.)
  • ignore: resize the LV without checking for or handling a file system.
Warning: using ignore when reducing the LV size may destroy the file system.

Note: if resizing an LV without a file system and the new LV size matches the existing size, the command returns a non-zero status code (failure). however, if a file system resize is also requested along with the LV resize, and the sizes already match, the command returns a zero status code (success). this occurs because the external commands called to resize the file system return success even if the new and old file system sizes are identical. LVM follows the command status code behavior in this scenario. yes it's a little unhinged, but it's documented, so it's fine ๐Ÿ’…

  • --fsmode String โ€” controls file system mounting behavior for fs resize. the three moods:
    • manage: mount or unmount the fs as needed to resize the fs, and attempt to restore the original mount state at the end.
    • nochange: do not mount or unmount the fs. if mounting or unmounting is required to resize the fs, then do not resize the fs or the LV and fail the command.
    • offline: unmount the fs if it is mounted, and resize the fs while it is unmounted. if mounting is required to resize the fs, then do not resize the fs or the LV and fail the command.
  • -h|--help โ€” display help text. the classic ๐Ÿซถ
  • --journal String โ€” record information in the systemd journal. this info is in addition to information enabled by the lvm.conf log/journal setting. your options:
    • command: record information about the command.
    • output: record the default command output.
    • debug: record full command debugging.
  • --lockopt String โ€” used to pass options for special cases to lvmlockd. see lvmlockd(8) for more information.
  • --longhelp โ€” display long help text. the extended cut ๐Ÿ“–
  • -m|--mirrors Number โ€” Not used.
  • -n, --nofsck โ€” bestie, when you're resizing the file system with --resizefs, this says do NOT run fsck. Skipping the check. Living dangerously, we love that for you ๐Ÿ™ˆ
  • --nohints โ€” don't use the hints file to find devices for PVs. So without hints, a command might have to read more devices to hunt down your PVs. It still does the standard hint file invalidation where appropriate, no worries. Justโ€ฆ more scanning energy ๐Ÿ’…
  • --nolocking โ€” disables locking entirely. > Use with caution, concurrent commands may produce incorrect results. Like fr fr, this is the "I turned off the safety and I'm holding it sideways" option ๐Ÿ’€
  • --nosync โ€” this one makes creating mirror, raid1, raid4, raid5 and raid10 skip the initial synchronization. Okay so what that means:
    • For mirror, raid1 and raid10: anything written afterwards gets mirrored, but the original contents will not be copied over. So the old data justโ€ฆ isn't there. ๐Ÿ™ˆ
    • For raid4 and raid5: no parity blocks get written, though any data written afterwards will cause parity blocks to be stored.
    • It's useful for skipping a potentially long and resource-intensive initial sync of an empty mirror/raid1/raid4/raid5 and raid10 LV. Empty! Key word!
    • Not valid for raid6 โ€” because raid6 relies on proper parity (P and Q Syndromes) being created during initial synchronization in order to reconstruct proper user data in case of device failures. So no skipping, bestie, raid6 needs that sync ๐Ÿ˜ค
    • raid0 and raid0_meta don't provide any data copies or parity support and thus don't support initial synchronization at all.
  • --noudevsync โ€” disables udev synchronization. The process won't wait for a notification from udev, it'll just continue irrespective of any possible udev processing happening in the background. Only use this if udev isn't running, or if it has rules that ignore the devices LVM creates. ๐Ÿ‘‘
  • --poolmetadatasize [+]Size[m|UNIT] โ€” sets the new size of the pool metadata LV. You can use the plus prefix +, in which case the value gets added to the current size instead of replacing it โœจ
  • --profile String โ€” an alias for --commandprofile or --metadataprofile, depending on which command you're running. One option to rule them both ๐ŸŽ€
  • -q, --quiet ... โ€” suppresses output and log messages. Overrides --debug and --verbose. Repeat it once and it also suppresses any prompts with answer 'no'. Shhh, we're being mysterious ๐Ÿคซ
  • --reportformat basic|json|json_std โ€” overrides the current output format for reports, which is normally defined globally by the report/output_format setting in lvm.conf(5).
    • basic is the original format with columns and rows. If there's more than one report per command, each report is prefixed with the report name so you can tell them apart.
    • json produces report output in JSON format.
    • json_std produces report output in JSON format which is more compliant with the JSON standard.
    • See lvmreport(7) for more info ๐Ÿ“Š
  • -r, --resizefs โ€” resizes the fs using the fs-specific resize command (See: resize2fs(8), xfs_growfs(8), btrfs(8)). It may include mounting, unmounting, or running fsck. See --fsmode to control mounting behavior, and --nofsck to disable fsck. See --fs for more options (--resizefs is equivalent to --fs resize.) Two commands in one, the multitasking queen ๐Ÿ‘‘
  • -L, --size [+]Size[m|UNIT] โ€” specifies the new size of the LV. The --size and --extents options are alternate methods of specifying size, pick your fighter. The total number of physical extents used will be greater when redundant data is needed for RAID levels. When the plus + or minus - prefix is used, the value is not an absolute size but is relative, added or subtracted from the current size ๐Ÿ’–
  • -i, --stripes Number โ€” specifies the number of stripes in a striped LV. This is the number of PVs (devices) that a striped LV is spread across. Data that appears sequential in the LV is spread across multiple devices in units of the stripe size (see --stripesize). This does not change existing allocated space โ€” it only applies to space being allocated by the command.
    • When creating a RAID 4/5/6 LV, this number does not include the extra devices that are required for parity. Important, don't forget it ๐Ÿซถ
    • Largest number depends on the RAID type: raid0: 64, raid10: 32, raid4/5: 63, raid6: 62.
    • When unspecified, the default depends on the RAID type: raid0: 2, raid10: 2, raid4/5: 3, raid6: 5.
    • To stripe a new raid LV across all PVs by default, see lvm.conf(5) allocation/raid_stripe_all_devices. Iykyk ๐ŸŒˆ
  • -I, --stripesize Size[k|UNIT] โ€” the amount of data that is written to one device before moving to the next in a striped LV. Small but mighty ๐ŸŽ€
  • -t, --test โ€” run in test mode. Commands will not update metadata. This is implemented by disabling all metadata writing but nevertheless returning success to the calling function. > This may lead to unusual error messages in multi-stage operations if a tool relies on reading back metadata it believes has changed but hasn't. So it's like, fake success, real confusion ๐Ÿ˜ญ
  • --type linear|striped|snapshot|raid|mirror|thin|thin-pool|vdo|vdo-pool|cache|cache-pool|writecache โ€” the LV type, also known as "segment type" or "segtype". See usage descriptions for the specific ways to use these types.
    • For more info about redundancy and performance (raid<N>, mirror, striped, linear) see lvmraid(7).
    • For thin provisioning (thin, thin-pool) see lvmthin(7).
    • For performance caching (cache, cache-pool) see lvmcache(7).
    • For copy-on-write snapshots (snapshot) see usage definitions.
    • For VDO (vdo) see lvmvdo(7).
    • Several commands omit an explicit type option because the type is inferred from other options or shortcuts (e.g. --stripes, --mirrors, --snapshot, --virtualsize, --thin, --cache, --vdo). > Use inferred types with care because it can lead to unexpected results. The universe is guessing for you ๐Ÿ’€
  • --usepolicies โ€” performs an operation according to the policy configured in lvm.conf(5) or a profile. Let the config file be the main character ๐Ÿ‘‘
  • -v, --verbose ... โ€” sets the verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to stdout and stderr. Spam me with the lore ๐Ÿ”ฅ
  • --version โ€” displays version information. Slay, now you know who you're dealing with ๐Ÿ‘‘
  • -y, --yes โ€” does not prompt for confirmation interactively but always assumes the answer is yes. > Use with extreme caution. (For automatic no, see -qq.) This is the "I said yes and I meant it" button, and it will NOT ask you twice ๐Ÿšจ

๐Ÿฆ‹ VARIABLES ๐Ÿฆ‹

  • LV โ€” Logical Volume name. See lvm(8) for valid names. An LV positional arg generally includes the VG name and LV name, e.g. VG/LV. LV1 indicates the LV must have a specific type, where the accepted LV types are listed. (raid represents raid<N> type.) ๐Ÿ’…
  • PV โ€” Physical Volume name, a device path under /dev. For commands managing physical extents, a PV positional arg generally accepts a suffix indicating a range (or multiple ranges) of physical extents (PEs). When the first PE is omitted, it defaults to the start of the device, and when the last PE is omitted it defaults to the end.

Start and end range (inclusive):

PV[:PE-PE] ...

Start and length range (counting from 0):

PV[:PE+PE] ...
  • String โ€” see the option description for information about the string content. Varies by option, bestie, read the receipt ๐Ÿงพ
  • Size[UNIT] โ€” Size is an input number that accepts an optional unit. Input units are always treated as base two values, regardless of capitalization, e.g. 'k' and 'K' both refer to 1024. The default input unit is specified by the letter, followed by |UNIT. UNIT represents other possible input units: b|B is bytes, s|S is sectors of 512 bytes, k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB, p|P is PiB, e|E is EiB. > (This should not be confused with the output control --units, where capital letters mean multiple of 1000.) Two different worlds, two different rules ๐ŸŒ

๐ŸŒˆ ENVIRONMENT VARIABLES ๐ŸŒˆ

See lvm(8) for information about environment variables used by lvm. For example, LVM_VG_NAME can generally be substituted for a required VG parameter. One less thing to type, we love efficiency โœจ

๐Ÿ“ EXAMPLES ๐Ÿ“

Extend the size of an LV by 54MiB, using a specific PV.

lvextend -L +54 vg01/lvol10 /dev/sdk3

Extend the size of an LV by the amount of free space on PV /dev/sdk3. This is equivalent to specifying "-l +100%PVS" on the command line.

lvextend vg01/lvol01 /dev/sdk3

Extend an LV by 16MiB using specific physical extents.

lvextend -L+16m vg01/lvol01 /dev/sda:8-9 /dev/sdb:8-9

Extend an LV to use all remaining free space in the volume group and also resize its filesystem with fsadm(8).

lvextend -l+100%FREE -r vg01/lvol01

๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘


and that's the whole page, bestie, you made it to the end ๐Ÿ’– this iconic piece of documentation is brought to you by Red Hat, Inc., and it's LVM TOOLS 2.03.44(2) dated (2026-10-27). go forth and extend responsibly, mwah ๐Ÿซถ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from