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.
| Shortcut | Action |
|---|---|
| config | The same as lvmconfig(8) below |
| devtypes | Display the recognised built-in block device types |
| dumpconfig | The same as lvmconfig(8) below |
| formats | Display recognised metadata formats |
| fullreport | Report information about PVs, PV segments, VGs |
| help | Display the help text |
| lastlog | Display log report of last command run in LVM shell if |
| lvpoll | Complete lvmpolld operations (Internal command) |
| segtypes | Display recognised Logical Volume segment types |
| systemid | Display any system ID currently set on this host |
| tags | Display any tags defined on this host |
| version | Display version information |
| Shortcut | Action |
|---|---|
| pvchange | Change attributes of a Physical Volume |
| pvck | Check Physical Volume metadata |
| pvcreate | Initialize a disk or partition for use by LVM |
| pvdisplay | Display attributes of a Physical Volume |
| pvmove | Move Physical Extents |
| pvremove | Remove a Physical Volume |
| pvresize | Resize a disk or partition in use by LVM |
| pvs | Report information about Physical Volumes |
| pvscan | List Physical Volumes |
| Shortcut | Action |
|---|---|
| vgcfgbackup | Backup Volume Group descriptor area |
| vgcfgrestore | Restore Volume Group descriptor area |
| vgchange | Change attributes of a Volume Group |
| vgck | Check Volume Group metadata |
| vgcreate | Create a Volume Group |
| vgdisplay | Display attributes of Volume Groups |
| vgexport | Make Volume Groups unknown to the system |
| vgextend | Add Physical Volumes to a Volume Group |
| vgimport | Make exported Volume Groups known to the system |
| vgimportclone | Import and rename duplicated Volume Group |
| vgimportdevices | Add PVs from a VG to the devices file |
| vgmerge | Merge two Volume Groups |
| vgmknodes | Recreate Volume Group directory and Logical Volume special |
| vgreduce | Reduce a Volume Group by removing one or more Physical |
| vgremove | Remove a Volume Group |
| vgrename | Rename a Volume Group |
| vgs | Report information about Volume Groups |
| vgscan | List Volume Groups |
| vgsplit | Split a Volume Group into two |
| Shortcut | Action |
|---|---|
| lvchange | Change attributes of a Logical Volume |
| lvconvert | Convert a Logical Volume from linear to mirror or snapshot |
| lvcreate | Create a Logical Volume in an existing Volume Group |
| lvdisplay | Display attributes of a Logical Volume |
| lvextend | Extend the size of a Logical Volume |
| lvreduce | Reduce the size of a Logical Volume |
| lvremove | Remove a Logical Volume |
| lvrename | Rename a Logical Volume |
| lvresize | Resize a Logical Volume |
| lvs | Report information about Logical Volumes |
| lvscan | List Logical Volumes |
| Shortcut | Action |
|---|---|
| lvmconfig | Display the configuration information after loading |
| lvmdevices | Manage the devices file |
| lvmdiskscan | Scan for all devices visible to LVM |
| lvmdump | Create LVM information dumps for diagnostic purposes |
| Shortcut | Action |
|---|---|
| HOME | Directory containing .lvm_history if the internal readline |
| LVM_OUT_FD | File descriptor to use for common output from LVM commands |
| LVM_ERR_FD | File descriptor to use for error output from LVM commands |
| LVM_REPORT_FD | File descriptor to use for report output from LVM commands |
| LVM_COMMAND_PROFILE | Name of default command profile to use for LVM commands |
| LVM_RUN_BY_DMEVENTD | This variable is normally set by dmeventd plugin to inform |
| LVM_SYSTEM_DIR | Directory containing lvm.conf(5) and other LVM system |
| LVM_SUPPRESS_FD_WARNINGS | Suppress warnings about unexpected file descriptors passed |
| LVM_SUPPRESS_SYSLOG | Suppress contacting syslog |
| LVM_VG_NAME | The Volume Group name that is assumed for any reference |
| LVM_LVMPOLLD_PIDFILE | Path to the file that stores the lvmpolld process ID |
| LVM_LVMPOLLD_SOCKET | Path to the socket used to communicate with lvmpolld |
| LVM_LOG_FILE_EPOCH | A string of up to 32 letters appended to the log filename |
| LVM_LOG_FILE_MAX_LINES | If more than this number of lines are sent to the log |
| LVM_EXPECTED_EXIT_STATUS | The status anticipated when the process exits |
| LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES | Used to suppress warning messages when the configured |
| DM_ABORT_ON_INTERNAL_ERRORS | Abort processing if the code detects a non-fatal internal |
| DM_DISABLE_UDEV | Avoid interaction with udev |
| DM_DEBUG_WITH_LINE_NUMBERS | Prepends source file name and code line number with libdm |
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 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.
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.
lvextend -r -L +10G /dev/vg/lv (or lvresize -r). The -r flag resizes the filesystem after the LV.
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.
pvmove /dev/sdX to migrate its extents, then vgreduce vg /dev/sdX and pvremove /dev/sdX.
pvs prints one line per PV for scripting; pvdisplay prints a detailed block per PV. The same pairing exists for vg and lv.
Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"