LVREDUCE(8)

πŸŽ€ lvreduce(8) πŸŽ€

System Manager's Manual Β· lvreduce Β· System Manager's Manual Β· LVREDUCE(8)

okay bestie, welcome to the page about shrinking your logical volumes β€” and yes, it's as dramatic as it sounds. πŸ’…


πŸ’– NAME πŸ’–

lvreduce β€” Reduce the size of a logical volume πŸ¦‹


✨ SYNOPSIS ✨

lvreduce option_args position_args
       [ option_args ]

🌸 DESCRIPTION 🌸

lvreduce makes an LV smaller. The logical extents you free up get handed right back to the VG so your other LVs can use them. πŸ’– You can also shrink a copy-on-write snapshot LV this way, if it turns out the snack doesn't need as much space to hold COW blocks. And if you're trying to change how many data images a RAID or mirrored LV has? That's not this tool, bestie β€” go use lvconvert(8) for that. 🧚

🚨 BE CAREFUL when you reduce an LV's size, because data in the reduced area is lost. Periodt. πŸ’€ Make absolutely sure that any file system on the LV is resized before you run lvreduce, so the extents getting removed are not in use by the file system.

Sizes get rounded if they need to be, no cap. For example, the LV size has to be an exact number of extents, and the size of a striped segment has to be a multiple of the number of stripes. The math said what it said. πŸ“

Quick heads up for the usage section down below: --size Size can be swapped out for --extents Number. Both descriptions live in the options section, so peek at both. πŸ‘€


πŸ”₯ USAGE πŸ”₯

lvreduce -L|--size [-]Size[m|UNIT] LV
       [ -l|--extents [-]Number[PERCENT] ]
       [ -A|--autobackup y|n ]
       [ -f|--force ... ]
       [ -n|--nofsck ]
       [ -r|--resizefs ]
       [ --fs String ]
       [ --fsmode String ]
       [ --noudevsync ]
       [ --reportformat basic|json|json_std ]
       [ COMMON_OPTIONS ]

       β€”

       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 πŸ’…

  • -A|--autobackup y|n β€” Says whether your metadata should get backed up automatically after a change. Turning this on is strongly advised! 🫢 If you want the whole story, see vgcfgbackup(8).
  • --commandprofile String β€” The command profile to use for command configuration. lvm.conf(5) has all the tea about profiles. β˜•
  • --config String β€” Config settings just for this command. These override the lvm.conf(5) settings. The String arg uses the same format as lvm.conf(5), or it can use section/field syntax. Again, lvm.conf(5) is where the config lore lives. πŸ“–
  • -d|--debug ... β€” Sets the debug level. Repeat it 1 to 6 times to crank up how detailed the messages sent to the log file and/or syslog (if it's configured) get. πŸ”
  • --devices PV β€” Restricts which devices are visible and accessible to the command. Devices you don't list will look like they're just... missing. πŸ™ˆ This option can be repeated, or it accepts a comma-separated list of devices. It overrides the devices file.
  • --devicesfile String β€” A file listing the devices LVM should use. The file has to exist in /etc/lvm/devices/ and it's managed with the lvmdevices(8) command. This overrides the lvm.conf(5) devices/devicesfile and devices/use_devicesfile settings.
  • --driverloaded y|n β€” If you set it to no, the command won't even try to use device-mapper. It's for testing and debugging, bestie. πŸ§ͺ
  • -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 β€” pick your fighter. The total number of physical extents used will be greater when redundant data is needed for RAID levels.

There's also an alternate syntax that lets the size be figured out indirectly, as a percentage of the size of a related VG, LV, or set of PVs:

  • the suffix %VG means the total size of the VG
  • the suffix %FREE means the remaining free space in the VG
  • the suffix %PVS means 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 it's 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 isn't determined until the command has finished β€” so don't @ it before it's done. ⏳ And when the plus + or minus - prefix is used, the value is not an absolute size, it's relative: it gets added to or subtracted from the current size.

  • -f|--force ... β€” Overrides various checks, confirmations and protections. Use with extreme caution. ⚠️ Like, for real.
  • --fs String β€” Controls file system resizing when resizing an LV. Your options:
    • 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 the 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 you're 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). But 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 happens 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. πŸ€·β™€οΈ
  • --fsmode String β€” Controls file system mounting behavior for fs resize. The vibes:
    • 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's mounted, and resize the fs while it's 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. πŸ†˜
  • --journal String β€” Records information in the systemd journal. This info is in addition to whatever the lvm.conf log/journal setting already enables:
    • 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 deluxe version, bestie. πŸ“œ
  • -n|--nofsck β€” Do not perform fsck when resizing the file system with --resizefs. βœ‹
  • --nohints β€” Do not use the hints file to locate devices for PVs. A command may read more devices to find PVs when hints aren't used. The command will still perform standard hint file invalidation where appropriate. ✨
  • --nolocking β€” Disables locking. Use with caution β€” concurrent commands may produce incorrect results. 😡
  • --noudevsync β€” Disables udev synchronization. The process won't wait for notification from udev, and it'll just keep going no matter what udev is doing in the background. Only use this if udev isn't running, or if it has rules that ignore the devices LVM creates. πŸ™ƒ
  • --profile String β€” An alias for --commandprofile or --metadataprofile, depending on the command. πŸ’«
  • -q|--quiet ... β€” Suppresses output and log messages. Overrides --debug and --verbose. Repeat it once to also suppress any prompts with answer 'no'. 🀫
  • --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 for identification.
    • 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 information. πŸ“Š

  • -r|--resizefs β€” Resize the fs using the fs-specific resize command (See: resize2fs(8), xfs_growfs(8), btrfs(8).) 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.) πŸ”§
  • -L|--size [-]Size[m|UNIT] β€” Specifies the new size of the LV. The --size and --extents options are alternate methods of specifying size. 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 β€” it's relative, and gets added to or subtracted from the current size. πŸ“
  • -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. 🧠
  • -v|--verbose ... β€” Sets the verbose level. Repeat it 1 to 4 times to increase the detail of messages sent to stdout and stderr. πŸ”Š
  • --version β€” Display version information. 🏷️
  • -y|--yes β€” Do not prompt for confirmation interactively but always assume the answer is yes. Use with extreme caution. (For automatic no, see -qq.) πŸ™ˆ

okay that's the top half of this page handled β€” there is absolutely more where that came from, so don't go anywhere, bestie πŸŽ€

πŸ’« VARIABLES πŸ’«

🏷️ LV

Logical Volume name, bestie. Peep lvm(8) for what counts as a valid name. And ngl, an LV positional arg generally includes the VG name and the LV name together, like VG/LV β€” they're a package deal, you don't split them up. 🫢

πŸ”€ String

It's giving "read the option description." Fr fr, the string content deets live in the description of whichever option you're using it with β€” go look there. ✨

πŸ“ Size[UNIT]

Okay so Size is an input number, and it can optionally carry a unit with it. And here's the thing β€” input units are always treated as base two values, no matter how you capitalize them. Like k and K? Both of them mean 1024. The case does not matter AT ALL here. πŸ’…

The default input unit gets specified as a letter, followed by |UNIT. And UNIT is where all the other possible input units live:

  • b|B β€” bytes
  • s|S β€” sectors of 512 bytes
  • k|K β€” KiB
  • m|M β€” MiB
  • g|G β€” GiB
  • t|T β€” TiB
  • p|P β€” PiB
  • e|E β€” EiB
⚠️ Do not confuse this with the output control --units, bestie β€” for that one, capital letters mean a multiple of 1000. Different vibe, different math, don't mix them up or you'll be sad. 😭

🌱 ENVIRONMENT VARIABLES 🌱

Head over to lvm(8) for the whole rundown on the environment variables lvm plays with, bestie. But for a lil taste: LVM_VG_NAME can generally be swapped in for a required VG parameter. Slay, honestly β€” no cap. πŸ’–


πŸŽ€ EXAMPLES πŸŽ€

Wanna shrink an LV by 3 logical extents? Say less:

lvreduce -l -3 vg00/lvol1

Periodt. That's the whole thing. πŸ‘‘


πŸ‘‘ SEE ALSO πŸ‘‘

The whole friend group, in formation. πŸ’œ

The OGs and the config crew:

PV gang:

VG gang:

LV gang:

Reporting + utility icon behavior:

Daemons and friends:

The deep lore (section 7, iykyk):


And that's a wrap, babe! πŸ¦‹ This whole thing was brought to you by Red Hat, Inc., running LVM TOOLS 2.03.44(2) with a date stamp of 2026-10-27, and it's the LVREDUCE(8) page front to back. Go forth and reduce your LVs responsibly, bestie β€” measure twice, lvreduce once. πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from