LVM (Logical Volume) Commands

Complete LVM (Logical Volume) commands reference — 74 commands across 6 categories. Quick reference cheat sheet for Linux.

LVM has three layers — physical volumes, volume groups and logical volumes — and its commands are named by prefix: pv, vg, lv. Once that pattern is clear, the table becomes predictable: every layer has a create, display, extend, reduce, remove and a short-report command. The notes follow the order in which a disk is turned into a mounted filesystem, then the two operations that cause data loss when done in the wrong order.

Built-in Commands (12)

ShortcutAction
configThe same as lvmconfig(8) below
devtypesDisplay the recognised built-in block device types
dumpconfigThe same as lvmconfig(8) below
formatsDisplay recognised metadata formats
fullreportReport information about PVs, PV segments, VGs
helpDisplay the help text
lastlogDisplay log report of last command run in LVM shell if
lvpollComplete lvmpolld operations (Internal command)
segtypesDisplay recognised Logical Volume segment types
systemidDisplay any system ID currently set on this host
tagsDisplay any tags defined on this host
versionDisplay version information

Physical Volume Commands (9)

ShortcutAction
pvchangeChange attributes of a Physical Volume
pvckCheck Physical Volume metadata
pvcreateInitialize a disk or partition for use by LVM
pvdisplayDisplay attributes of a Physical Volume
pvmoveMove Physical Extents
pvremoveRemove a Physical Volume
pvresizeResize a disk or partition in use by LVM
pvsReport information about Physical Volumes
pvscanList Physical Volumes

Volume Group Commands (19)

ShortcutAction
vgcfgbackupBackup Volume Group descriptor area
vgcfgrestoreRestore Volume Group descriptor area
vgchangeChange attributes of a Volume Group
vgckCheck Volume Group metadata
vgcreateCreate a Volume Group
vgdisplayDisplay attributes of Volume Groups
vgexportMake Volume Groups unknown to the system
vgextendAdd Physical Volumes to a Volume Group
vgimportMake exported Volume Groups known to the system
vgimportcloneImport and rename duplicated Volume Group
vgimportdevicesAdd PVs from a VG to the devices file
vgmergeMerge two Volume Groups
vgmknodesRecreate Volume Group directory and Logical Volume special
vgreduceReduce a Volume Group by removing one or more Physical
vgremoveRemove a Volume Group
vgrenameRename a Volume Group
vgsReport information about Volume Groups
vgscanList Volume Groups
vgsplitSplit a Volume Group into two

Logical Volume Commands (11)

ShortcutAction
lvchangeChange attributes of a Logical Volume
lvconvertConvert a Logical Volume from linear to mirror or snapshot
lvcreateCreate a Logical Volume in an existing Volume Group
lvdisplayDisplay attributes of a Logical Volume
lvextendExtend the size of a Logical Volume
lvreduceReduce the size of a Logical Volume
lvremoveRemove a Logical Volume
lvrenameRename a Logical Volume
lvresizeResize a Logical Volume
lvsReport information about Logical Volumes
lvscanList Logical Volumes

LVM Utilities (4)

ShortcutAction
lvmconfigDisplay the configuration information after loading
lvmdevicesManage the devices file
lvmdiskscanScan for all devices visible to LVM
lvmdumpCreate LVM information dumps for diagnostic purposes

Environment Variables (19)

ShortcutAction
HOMEDirectory containing .lvm_history if the internal readline
LVM_OUT_FDFile descriptor to use for common output from LVM commands
LVM_ERR_FDFile descriptor to use for error output from LVM commands
LVM_REPORT_FDFile descriptor to use for report output from LVM commands
LVM_COMMAND_PROFILEName of default command profile to use for LVM commands
LVM_RUN_BY_DMEVENTDThis variable is normally set by dmeventd plugin to inform
LVM_SYSTEM_DIRDirectory containing lvm.conf(5) and other LVM system
LVM_SUPPRESS_FD_WARNINGSSuppress warnings about unexpected file descriptors passed
LVM_SUPPRESS_SYSLOGSuppress contacting syslog
LVM_VG_NAMEThe Volume Group name that is assumed for any reference
LVM_LVMPOLLD_PIDFILEPath to the file that stores the lvmpolld process ID
LVM_LVMPOLLD_SOCKETPath to the socket used to communicate with lvmpolld
LVM_LOG_FILE_EPOCHA string of up to 32 letters appended to the log filename
LVM_LOG_FILE_MAX_LINESIf more than this number of lines are sent to the log
LVM_EXPECTED_EXIT_STATUSThe status anticipated when the process exits
LVM_SUPPRESS_LOCKING_FAILURE_MESSAGESUsed to suppress warning messages when the configured
DM_ABORT_ON_INTERNAL_ERRORSAbort processing if the code detects a non-fatal internal
DM_DISABLE_UDEVAvoid interaction with udev
DM_DEBUG_WITH_LINE_NUMBERSPrepends source file name and code line number with libdm
📄 View Printable Cheat Sheet — Download as PDF or print · 🧩 Combine with other tools

Related Shortcut Pages

ZFS Proxmox VE VMware ESXi Linux Bash / Shell Docker

Search 18,500+ shortcuts across 268 platforms

Explore All Platforms Practice Shortcuts

From disk to filesystem

pvcreate initialises a disk or partition for LVM, vgcreate makes a volume group from one or more PVs, and lvcreate carves a logical volume out of the group's free extents — -L 20G for a fixed size, -l 100%FREE for the rest. Format and mount the resulting /dev/vgname/lvname like any block device. pvs, vgs and lvs are the one-line reports for each layer; pvdisplay, vgdisplay and lvdisplay are the verbose forms.

Growing safely, shrinking carefully

Growing is safe: vgextend adds a new PV to the group, lvextend grows the LV (with -r to resize the filesystem in the same step), and pvresize picks up a disk that was enlarged underneath. Shrinking is the operation that destroys data when done in the wrong order: the filesystem must be shrunk first, then lvreduce; lvresize with -r handles both directions in the right order and is the safer command to type. vgreduce removes a PV from a group only after pvmove has migrated its extents elsewhere.

Snapshots, recovery and cleanup

lvcreate with -s makes a snapshot of an LV — a point-in-time copy for backups or before a risky upgrade — and lvconvert merges it back or converts a linear LV to a mirror. vgcfgbackup and vgcfgrestore save and restore the VG metadata, which is the recovery path when a PV header is damaged; LVM also keeps automatic backups under /etc/lvm. vgexport and vgimport move a group between hosts cleanly, and vgrename and lvrename fix names without touching data. lvremove, vgremove and pvremove tear the layers down in that order. lvmdiskscan lists every block device LVM can see.

Frequently asked questions

How do I grow a logical volume and its filesystem in one command?

lvextend -r -L +10G /dev/vg/lv (or lvresize -r). The -r flag resizes the filesystem after the LV.

How do I shrink a logical volume safely?

Use lvresize -r -L -5G, which shrinks the filesystem first, then the LV. Never run lvreduce before the filesystem is smaller than the new size.

How do I remove a disk from a volume group?

pvmove /dev/sdX to migrate its extents, then vgreduce vg /dev/sdX and pvremove /dev/sdX.

What is the difference between pvs and pvdisplay?

pvs prints one line per PV for scripting; pvdisplay prints a detailed block per PV. The same pairing exists for vg and lv.

🤖 Ask AI about LVM (Logical Volume) shortcuts

Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"

ChatGPT Claude Perplexity Gemini Grok
📜 Every shortcut on this page is taken from the official LVM (Logical Volume) documentation — man7.org
🔧 Spotted an error or a missing shortcut? Suggest an edit on GitHub — every accepted fix goes live on this page, the API and the CLI.