Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

LVM

Direct answer

LVM pools disks into a volume group and carves logical volumes out of it. A filesystem sits on a logical volume, which can be grown without regard to where the physical disks end.

When to use this

Use it when a filesystem is full and must be extended, when a disk is added or replaced, or when a volume is missing after boot.

First 30 seconds

1. df -h <mount> — which filesystem is full? lsblk — which logical volume is it on?

2. vgs — is there free space (VFree)?

3. Yes → lvextend -r -L +10G /dev/<vg>/<lv>.

4. No → add a disk: pvcreate /dev/sdX, vgextend <vg> /dev/sdX, then step 3.

5. Disk enlarged in the hypervisor → pvresize /dev/sdX first.

Operational verification

disk or partition → physical volume → volume group with free extents → logical volume extended → filesystem grown → df shows the new size

Evidence · next step

For LVM, continue with the first unproven Topic check: Capture PV/VG/LV UUIDs, sizes, extent allocation, segment layout and device mappings. If that boundary is healthy, advance to the adjacent check: Confirm every expected PV is present before modifying VG/LV metadata. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common interpretation traps
  • "The disk was enlarged, so the filesystem is bigger." Each layer must be grown: partition or PV (pvresize), LV (lvextend), filesystem (-r, or xfs_growfs / resize2fs).
  • "df shows full, so there is no space." Check vgs; the volume group may have free extents.
  • "lvextend made the filesystem larger." Only with -r; otherwise the filesystem must be resized separately.
  • "A volume can be shrunk like it was grown." XFS cannot shrink, and shrinking the volume before the filesystem destroys data.
  • "A snapshot is a backup." It lives in the same volume group and depends on the original; it is invalidated when it runs out of space.
  • "LVM protects against disk failure." Not unless the volume is mirrored or sits on RAID; a volume group spanning disks is lost when one fails.
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Key commandpvcreate
Scope / prerequisiteUse it when a filesystem is full and must be extended, when a disk is added or replaced, or when a volume is missing af…
Reference · 3
What next?3 suggested next steps
Child topics (this level)8
Catalog command links3
Evidence1
On this pageJump to a specific section
Linux command reference

Primary Commands

Configuration and operational commands for this Topic.

pvcreateReference
pvcreate

Initialize a block device or partition as an LVM physical volume.

Use when: Primary lookup intent: destructive. Use pvcreate when the lookup goal is to initialize a block device or partition as an LVM physical volume. Tie the result to the same host, namespace, user identity and time window as the symptom.

Quick note: Post-change verification for pvcreate: Verify PV/VG identity and every dependent storage layer plus application data integrity. Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: destructive. Safety class: destructive. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. pvcreate is documented as an operational lookup primitive under LVM. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.

Linux · configuration
vgcreateReference
vgcreate

Create an LVM volume group from one or more physical volumes.

Use when: Primary lookup intent: configure. Use vgcreate when the lookup goal is to create an LVM volume group from one or more physical volumes. Tie the result to the same host, namespace, user identity and time window as the symptom.

Quick note: Post-change verification for vgcreate: Verify VG/PV identity, metadata and any downstream LV/filesystem/workload. Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: configure. Safety class: changes_state. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. vgcreate is documented as an operational lookup primitive under LVM. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.

Linux · configuration
lvcreateReference
lvcreate

Allocate and create an LVM logical volume inside a volume group.

Use when: Primary lookup intent: configure. Use lvcreate when the lookup goal is to allocate and create an LVM logical volume inside a volume group. Tie the result to the same host, namespace, user identity and time window as the symptom.

Quick note: Post-change verification for lvcreate: Verify VG/LV metadata, mappings and any filesystem/workload created on the LV. Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: configure. Safety class: changes_state. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. lvcreate is documented as an operational lookup primitive under LVM. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.

Linux · configuration
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

9 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational evidence path Verify boundary

block device/partition → PV label/metadata → VG extent pool → LV segment mapping → device-mapper device → filesystem/mount → workload

Healthy evidence: all expected PV UUIDs are present, VG metadata is consistent, LV segment mappings and sizes match intent, upper filesystems align and workload I/O succeeds.

Step 2 Operational verification Verify boundary

Physical volumes, volume groups, logical volumes, resizing and mapping block-storage dependencies.

Fast verification

  • Map PV → VG → LV with pvs, vgs and lvs -a -o +devices.

- Confirm free extents and underlying device health before extending a volume.

- Resizing the LV and resizing the filesystem are separate operations; verify both.

Step 3 Commands Verify boundary
pvs
vgs
lvs -a -o +devices
lvdisplay /dev/vg0/data
Step 4 Verification and output interpretation Verify boundary

Verification path. Walk the same stack the workload uses: physical/path health → block identity/size/errors → partition/device-mapper/RAID/LVM state → filesystem integrity/capacity → mount options/namespace → application I/O.

Existing fast checks for this Topic. - Capture PV/VG/LV UUIDs, sizes, extent allocation, segment layout and device mappings.

  • Confirm every expected PV is present before modifying VG/LV metadata.
  • Map the target LV to its filesystem/mount/application consumer before resize operations.
  • After changes, verify device-mapper state, filesystem size and original workload I/O.

Verification chain. block device/partition → PV label/metadata → VG extent pool → LV segment mapping → device-mapper device → filesystem/mount → workload

Step 5 Specialized verification Verify boundary

Map the full chain from physical device/PV UUID through VG and LV to device-mapper path, filesystem/mount and consumer. Inspect sizes and attributes at each layer; do not infer filesystem size from LV size. After extension, verify the LV mapping and then the filesystem/application sees the new capacity. For degraded/thin/snapshot states, inspect the specific LV/pool attributes and kernel/device-mapper messages. A successful lvm command is only one transition in the storage stack.

Step 6 Common mistakes Narrow the fault
  • Running out of free extents for snapshots.
  • Shrinking LVs before shrinking the filesystem.
Step 7 Failure modes and next checks Narrow the fault

Suspicious evidence: missing PVs, duplicate PV UUIDs, partial VG activation, stale metadata copies or LV/filesystem size mismatch indicate an LVM-layer boundary failure.

LVM evidence shows volume-manager metadata and mappings, but it does not show backing media health, filesystem integrity or application consistency.

Next check: Continue from the first step that has not been verified: show backing identity, then on-device metadata, then filesystem/LVM mapping and effective mount/device state, and finally repeat the original workload I/O before any additional storage change.

Step 8 Special cases and limits Narrow the fault

LVM health does not show the underlying disk path is healthy or the filesystem above the LV is consistent. Free extents in a VG do not mean a filesystem can be safely reduced or that a thin pool has free physical data blocks. Multipath and udev identity issues can present duplicate devices. Snapshots are dependency chains, not independent backups. Keep media/path, PV/VG/LV mapping, filesystem and application data integrity separate.

Step 9 Where it fails Narrow the fault

Walk hardware/block device → kernel driver/mapper/RAID/LVM → filesystem → mount namespace/options → path permissions/MAC → consumer I/O and stop where observed state diverges.

Evidence references

Evidence · 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.

observation · 1
Drill down

Subtopics

Go one level deeper into this subject.

Subtopic Physical Volume (PV)

An LVM Physical Volume initializes a block device or partition with an LVM label/UUID and allocatable extents so it can participate in a Volume Group.

Subtopic Volume Group (VG)

An LVM Volume Group aggregates Physical Volume extents into a shared allocation pool and stores metadata describing PV membership, free extents and Logical Volume mappings.

Subtopic Logical Volume (LV)

An LVM Logical Volume is a device-mapper mapping assembled from Volume Group extents and exposed as a block device for filesystems, swap, databases or other consumers.

Subtopic Extend Logical Volume

Extending an LVM Logical Volume allocates additional Volume Group extents to the LV; it increases the block-device size but only increases filesystem capacity when the upper filesystem is separately and successfully grown.

Subtopic Reduce Logical Volume

Reducing an LVM Logical Volume removes addressable extents from the end of the logical device and is destructive unless the contained filesystem or raw data structure has first been safely reduced below the new boundary.

Subtopic Resize Filesystem

Resize Filesystem within the LVM branch coordinates an LV size change with the filesystem that consumes it, preserving the critical distinction between lower logical-block capacity and upper filesystem capacity.

Subtopic LVM Snapshots

LVM Snapshots create point-in-time copy-on-write block mappings tied to an origin LV, with classic snapshots depending on allocated COW space and thin snapshots depending on thin-pool metadata/data capacity.

Subtopic LVM Troubleshooting

LVM Troubleshooting localizes failures across backing block devices, PV discovery, VG metadata/membership, LV activation/device-mapper mappings, upper filesystem state and the final workload instead of treating every /dev/mapper symptom as one LVM problem.

Key points

Three layers: physical volume, volume group, logical volume — plus the filesystem on top, which must be grown too (lvextend -r does both). The free space that counts is VFree in vgs. XFS cannot shrink. A snapshot is not a backup.

Key checks
  • pvs — physical volumes and the group each belongs to.
  • vgs — volume groups; VFree is what is left to allocate.
  • lvs -a -o +devices — logical volumes and the disks under them.
  • lsblk -f — the whole stack from disk to mount point.
  • df -h <mount> — the filesystem's own view.
ReferenceWhat it is2 sections · depth on demand

Core model

Trace identity and size through every LVM layer: backing block device/partition → PV UUID/extents → VG membership/free extents → LV segments → device-mapper mapping → filesystem/mount. Preserve metadata backups and distinguish metadata changes from filesystem changes, especially for resize and snapshot operations.

Mental model

LVM (Logical Volume Manager) puts a flexible layer between disks and filesystems. Disks or partitions become physical volumes, physical volumes are pooled into a volume group, and logical volumes are carved out of the pool. Logical volumes can be grown, moved and snapshotted without regard to where the physical disks begin and end.

ReferenceWhy it matters2 sections · depth on demand

When to use it

Use this Topic when the problem is in LVM. Use Storage & Filesystems when the problem concerns Linux runtime, services, networking, identity, packages, storage or shell automation.

Why it matters operationally

LVM is how a Linux filesystem is extended without downtime — the most common storage task on a server. It also adds a layer that must be understood when things go wrong: a filesystem can be full while its volume group has free space, or a volume can be missing because one of the disks underneath is.

ReferenceHow it works1 section · depth on demand

How it works

Three layers.

LayerWhat it isList with
Physical volume (PV)A disk or partition initialised for LVMpvs
Volume group (VG)A pool made of one or more PVsvgs
Logical volume (LV)A block device allocated from the poollvs

The pool is divided into extents, 4 MiB by default; a logical volume is a list of extents. A filesystem is created on the logical volume, which appears as /dev/<vg>/<lv> and /dev/mapper/<vg>-<lv>.

Building it.

pvcreate /dev/sdb
vgcreate data /dev/sdb
lvcreate -n app -L 50G data
mkfs.xfs /dev/data/app

Growing a filesystem — the usual task — has two steps, the volume and the filesystem on it. lvextend -r does both:

lvextend -r -L +20G /dev/data/app

If the volume group has no free space, add a disk to it first: pvcreate /dev/sdc then vgextend data /dev/sdc.

The free space that matters is shown as VFree in vgs. df shows the filesystem; lvs shows the volume; vgs shows what is left to hand out.

Shrinking is riskier: the filesystem must be shrunk before the volume, and XFS cannot be shrunk at all.

Other operations. pvmove moves data off a physical volume while in use, so a disk can be replaced. A snapshot (lvcreate -s) keeps a point-in-time view and needs space for every block that changes afterwards; a snapshot that fills up becomes invalid. Thin provisioning lets volumes promise more space than the pool holds, which requires monitoring.

Activation. At boot, LVM scans devices, finds the volume groups and activates the logical volumes. A volume group with a missing physical volume is not fully activated, and the filesystems on it are not mounted.

ReferenceImportant terms & boundaries7 sections · depth on demand

What this shows and what it does not

LVM evidence shows volume-manager metadata and mappings, but it does not show backing media health, filesystem integrity or application consistency.

Important limits

Physical volumes, volume groups, logical volumes, resizing and mapping block-storage dependencies.

Platform notes: Commands assume a modern Linux distribution. Confirm distribution, init/resolver/firewall implementation and effective runtime configuration.

In depth

LVM: physical volumes, volume groups and logical volumes

LVM puts a flexible layer between disks and file systems. The lvm(8) manual page describes it as tools for creating virtual block devices from physical devices:

  • Physical volumes (PVs) are disks or partitions prepared for LVM.
  • Volume groups (VGs) pool one or more PVs.
  • Logical volumes (LVs) are the virtual devices that file systems and applications use.

Space is handed out in physical extents. When an operation needs space, LVM collects the free extents in the VG and applies its allocation policies.

Command families (manual)

ObjectCreateInspectChange
PVpvcreatepvs, pvdisplaypvresize, pvmove, pvremove
VGvgcreatevgs, vgdisplayvgextend, vgreduce, vgrename, vgcfgbackup, vgcfgrestore
LVlvcreatelvs, lvdisplaylvextend, lvreduce, lvresize, lvrename, lvconvert, lvremove

The configuration is in /etc/lvm/lvm.conf, and lvmconfig shows the configuration actually in effect.

What LVM makes easy

TaskHow
Grow a file system onlinelvextend -r
Add a disk to a full VGpvcreate + vgextend
Move data off a failing disk while in usepvmove /dev/sdb, then vgreduce
Point-in-time copiesSnapshots (lvcreate -s)
Thin provisioningThin pools and thin volumes
Mirroring or striping per LV--type raid1, -i stripes
host$ sudo pvs
  PV             VG  Fmt  Attr PSize   PFree
  /dev/nvme0n1p3 vg0 lvm2 a--  475.41g 427.41g
  /dev/sdc       vg1 lvm2 a--  100.00g  20.00g
host$ sudo vgs
  VG  #PV #LV #SN Attr   VSize   VFree
  vg0   1   3   0 wz--n- 475.41g 427.41g
  vg1   1   2   0 wz--n- 100.00g  20.00g
host$ sudo lvs -o lv_name,vg_name,lv_size,segtype,devices
  LV   VG  LSize  Type   Devices
  log  vg0 10.00g linear /dev/nvme0n1p3(7680)
  root vg0 30.00g linear /dev/nvme0n1p3(0)
  swap vg0  8.00g linear /dev/nvme0n1p3(10240)
host$ sudo vgcfgbackup vg0
  Volume group "vg0" successfully backed up.

Leave free space in the VG

vg0 has 427 GiB free. That's a good pattern: allocate what's needed now, and grow volumes later with lvextend -r. File systems such as XFS can't be shrunk, so space that's already allocated to them is hard to take back.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

How it works at runtime

Runtime state ownership and mechanics. Linux storage is layered: hardware/path and block devices, partition tables, device mapper or MD RAID, LVM, filesystem, mount namespace and application I/O.

Topic-specific state model. LVM layers flexible logical storage over one or more block devices by initializing Physical Volumes, grouping extents into Volume Groups and mapping Logical Volumes through device-mapper to upper filesystems or applications.

Technical metadata. Host, kernel/distribution, timestamp, device major/minor, /dev + sysfs path, model/serial/WWN where available, size/sector geometry, partition-table type and boundaries, UUID/PARTUUID, udev links, filesystem type/UUID/features, mount namespace/source/target/options, free blocks/inodes, PV/VG/LV UUIDs, extents/segments, device-mapper mapping, snapshot/thin state, kernel/storage errors, original workload path and I/O result.

Interpretation rule. - PV visible ≠ VG complete and activatable.

  • VG active ≠ every LV mapping is healthy.
  • LV extended ≠ filesystem expanded.
  • LVM command success ≠ workload I/O and data consistency verified.

Specialized mechanics

LVM2 layers Physical Volumes into Volume Groups and allocates Logical Volumes that device-mapper presents as block devices. Metadata describes extents and mappings; the filesystem or application above the LV is a separate layer. Thin pools, snapshots and mirrored/RAID LVs add allocation and failure semantics beyond a simple linear mapping. Device discovery and duplicate PV identifiers matter because LVM chooses devices by metadata identity rather than by the human-readable /dev name alone.

Mechanics

Follow the path in order: hardware/block device → kernel driver/mapper/RAID/LVM → filesystem → mount namespace/options → path permissions/MAC → consumer I/O.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Limits and how it fails

Primary failure point. LVM evidence shows volume-manager metadata and mappings, but it does not show backing media health, filesystem integrity or application consistency.

Free filesystem space says nothing about LVM thin-pool exhaustion or RAID redundancy.

ReferenceConfiguration & state2 sections · depth on demand

Configuration, persistence and lifecycle

Configuration intent and lifecycle. Persistent storage intent can live in partition metadata, MD superblocks, LVM metadata, crypt/device-mapper tables, filesystem superblocks and fstab/systemd mount units.

Distribution/platform context. LVM owns PV/VG/LV metadata, extent allocation, snapshots and logical-volume resizing. Filesystems owns filesystem resize; Disks owns backing partitions.

Specialized lifecycle

Plan changes from the bottom and top simultaneously: capacity must exist in the VG, the LV mapping must be extended or reduced, and any filesystem above it must be grown or shrunk with filesystem-specific rules. Extending is usually safer than reducing; reduction can destroy data if the filesystem is not safely shrunk first. Preserve metadata backups and verify device filters/autoactivation policy. For thin provisioning, monitor both data and metadata capacity because exhaustion of either can make the pool unusable.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

Authoritative/upstream documentation reviewed for bounded claims in LVM. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/configuring_and_managing_logical_volumes/ · confidence 94%
2026-09-13 · vendor docLVM2 current

Authoritative Linux project/vendor documentation reviewed for bounded reference claims: PV/VG/LV object model and device-mapper ownership boundaries. Documentation-based technical verification only; not lab or production-runtime proof. The schema vendor_doc method is used for authoritative project/vendor documentation; deployment applicability remains separate evidence.

Basis: https://man7.org/linux/man-pages/man8/lvm.8.html · confidence 93%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
linux lvmlogical volume managerpv vg lvdevice mapper lvm
Embedded reference data

Quick lookup tables

LVM operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for LVM.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateLVM layers flexible logical storage over one or more block devices by initializing Physical Volumes, grouping extents into Volume Groups and mapping Logical Volumes through device-mapper to upper filesystems or applications.Establish exactly what this Topic owns before crossing into another subsystem.
Fast verificationPin host + incident/change time → capture block topology and stable identities → validate partition/device metadata → validate filesystem identity/integrity and effective mount namespace/options → validate PV/VG/LV/device-mapper state where used → make one controlled change at the first failed boundary → re-read effective storage state → repeat original workload I/O/acceptance test.Use the shortest evidence path first; a fast check is a boundary test, not blanket proof.
Verification chainblock device/partition → PV label/metadata → VG extent pool → LV segment mapping → device-mapper device → filesystem/mount → workloadTrace requested/configured state through effective state to the observed workload result.
Failure boundaryLVM evidence proves volume-manager metadata and mappings; it does not prove backing media health, filesystem integrity or application consistency.Stop broad troubleshooting at the first boundary that is not supported by evidence.
Positive evidenceCorrelated Linux storage evidence can establish this proof path: block device/partition → PV label/metadata → VG extent pool → LV segment mapping → device-mapper device → filesystem/mount → workloadUse this observation only for the specific claim it actually supports.
Evidence limitIt does not independently prove behavior outside the captured device, metadata, mapping, mount or workload scope. LVM evidence proves volume-manager metadata and mappings; it does not prove backing media health, filesystem integrity or application consistency.Do not promote a local success signal into end-to-end or adjacent-dependency proof.
Next troubleshooting checkContinue from the first unproven boundary: prove backing identity, then on-device metadata, then filesystem/LVM mapping and effective mount/device state, and finally repeat the original workload I/O before any additional storage change.Continue to the next unresolved boundary while preserving the original test condition.

LVM · operational reference

Compact Linux state, persistence, verification and boundary reference for fast lookup.

Reference boundaryLVM
Topic pathLVM
Runtime stateLVM layers flexible logical storage over one or more block devices by initializing Physical Volumes, grouping extents into Volume Groups and mapping Logical Volumes through device-mapper to upper filesystems or applications.
Fast checks- Capture PV/VG/LV UUIDs, sizes, extent allocation, segment layout and device mappings. - Confirm every expected PV is present before modifying VG/LV metadata. - Map the target LV to its filesystem/mount/application consumer before resize operations. - After changes, verify device-mapper state, filesystem size and original workload I/O.
Verification chainblock device/partition → PV label/metadata → VG extent pool → LV segment mapping → device-mapper device → filesystem/mount → workload Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary.
Failure boundaryLVM evidence proves volume-manager metadata and mappings; it does not prove backing media health, filesystem integrity or application consistency. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload.
Persistence ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.

LVM · specialized operational reference

Topic-specific Linux mechanics, lifecycle, proof path and failure-boundary lookup.

Operational boundaryTopic-specific reference
Stackdevice → PV → VG → LV → filesystem/app
AllocationExtents and device-mapper mappings
Critical capacityVG free extents; thin data + metadata
ProofEach layer size/state plus consumer-visible result
Confirmation

Confirm action

Continue?