Lvm Cheatsheet

Logical Volume Manager for flexible disk and storage management in Linux

Updated at: March 12, 2025

Physical Volume Management

Physical Volumes (PVs) represent actual storage devices or partitions that will be used by LVM. Before creating volume groups, you must initialize disks or partitions as physical volumes.

Volume Group Management

Volume Groups (VGs) combine physical volumes into storage pools from which logical volumes can be allocated. They provide flexible storage administration and allow for dynamic resizing.

Logical Volume Creation

Logical volumes provide flexible storage management in Linux. They can be created with different layouts (linear, striped, mirrored) and features (thin provisioning, caching, RAID) to meet specific performance, capacity, and reliability requirements.

Logical Volume Operations

Logical Volume Operations allow you to manage existing logical volumes by resizing, renaming, removing, moving data, converting types, and controlling their activation state. These operations can typically be performed while the file system is mounted and in use.

Snapshot Management

LVM snapshots provide point-in-time copies of logical volumes, allowing you to preserve the state of a filesystem at a specific moment. They're useful for backups, testing changes, or creating consistent copies while the original volume remains in use.

LVM Monitoring and Reporting

LVM provides various tools to monitor and report on the state of your storage infrastructure. These commands help you track performance, check metadata integrity, and generate detailed reports about your LVM configuration.

LVM Backup and Recovery

LVM provides tools to backup and restore metadata, recover from device failures, and rebuild configurations. Regular backups of LVM metadata are essential for disaster recovery and should be part of any system maintenance routine.

LVM Advanced Configuration

Advanced LVM configuration allows fine-tuning storage behavior, performance, and automation. These settings enable administrators to customize how LVM interacts with devices, manages caching, handles allocation, and operates in clustered environments.