Use this when creating, extending or snapshotting Linux logical volumes.
LVM · Linux Storage
LVM (Logical Volume Manager) groups physical volumes into volume groups and carves them into logical volumes that can be resized, snapshotted or moved online, managed with pvs, vgs and lvs.
1. LVM on Linux: PV → VG → LV.
2. Online resize, snapshots, thin pools, cache, RAID LVs.
3. Filters for multipath.
4. Metadata backups automatic.
5. Activate with vgchange.
PV → VG → LV → filesystem
Context & applicabilityCommon mistakes · platform/version boundaries
- Snapshots left in place until they fill and become invalid.
- Growing the LV but not the file system (use
lvextend -r). - Shrinking XFS (not possible) or shrinking ext4 without unmounting first.
- Thin pools with no monitoring — when full, writes fail. Enable
thin_pool_autoextend_thresholdinlvm.conf.
Operational reference
Fast context before you go deeper.
pvs ; vgs ; lvsEvidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- PV → VG → LV layering.
- lvextend -r grows the file system too.
- Thin pools can overfill; monitor data and metadata.
pvs; vgs; lvs— LVM overviewlvs -a -o +devices— mappinglvm fullreport— complete state
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Everyday LVM inventory on a Linux host:
lsblk # where LVs sit on disks
pvs; vgs; lvs
lvs -a -o lv_name,vg_name,lv_size,segtype,data_percent,devices
dmsetup ls --tree
Typical layouts: RHEL installs rhel VG with root, swap (and home); Ubuntu server uses ubuntu-vg/ubuntu-lv and by default leaves part of the VG unallocated — lvextend -r -l +100%FREE ubuntu-vg/ubuntu-lv is the common first fix for a small root filesystem.
Thin pools
lvcreate -L 500G -T vg_data/thinpool
lvcreate -V 200G -T vg_data/thinpool -n lv_vm1
lvs -o +data_percent,metadata_percent vg_data
Documented example, not captured output. Thin LVs can exceed the pool size in total; monitor data_percent and metadata_percent.
ReferenceConfiguration & state1 section · depth on demand
Commands
pvcreate /dev/sdb
vgcreate vg_data /dev/sdb
lvcreate -n lv_app -L 100G vg_data
mkfs.xfs /dev/vg_data/lv_app
lvextend -r -L +50G /dev/vg_data/lv_app # -r grows the file system too
pvs ; vgs ; lvs
lvcreate -s -n lv_app_snap -L 10G /dev/vg_data/lv_app
Documented example, not captured output. Classic LVM snapshots slow writes and become invalid when full; thin pools give efficient snapshots. XFS can only grow, not shrink.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Linux Storage → LVM. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/block/index.html · confidence 94%