Pcornel
Browse topics
Options
Recent
Favorites
Storage · Technical reference

LVM · KVM Storage

Direct answer

LVM for KVM gives each VM disk its own logical volume as a raw block device, avoiding file-system overhead. Thin pools add snapshots and overcommit; shared VGs on SAN need cluster locking.

When to use this

Use this when KVM VM disks are LVM logical volumes.

First 30 seconds

1. LVM-backed VM disks: raw block LVs.

2. Fast; snapshots via LVM (thin recommended).

3. Shared LVM requires clustering (lvmlockd).

4. Name volumes after VMs.

5. Monitor VG free.

Operational verification

VM disk → LV → VG

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • Host LVM scanning and activating volume groups inside guest disks — set a filter or global_filter in lvm.conf.
  • Thick LVs taking all VG space, leaving none for snapshots.
  • No snapshot support in libvirt for LVM-backed disks beyond LVM's own snapshots.
Platform / version applicability
Hypervisor Storage
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.

PlatformHypervisor Storage
Scope / prerequisiteUse this when KVM VM disks are LVM logical volumes.
What next?2 suggested next steps
Evidence1
On this pageJump to a specific section
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
Key points
  • Raw block device without file system overhead.
  • Thin pools add snapshots.
  • Shared VGs need cluster locking.
Key checks
  • virsh pool-info <lvm-pool> — LVM pool
  • lvs <vg> — volumes
  • virsh vol-create-as <pool> <name> 20G — create
ReferenceHow it works1 section · depth on demand

Using LVM with libvirt

virsh pool-define-as vg_vms logical --source-name vg_vms --target /dev/vg_vms
virsh pool-start vg_vms ; virsh pool-autostart vg_vms
virsh vol-create-as vg_vms vm01-disk0 40G
virt-install ... --disk vol=vg_vms/vm01-disk0,bus=virtio

Documented example, not captured output. Raw LVM volumes give near-native performance; snapshots come from LVM (thin pools recommended). Shared LVM on SAN requires coordination (lvmlockd/clvmd) when several hosts use it.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

With LVM for KVM, each VM disk is a logical volume used directly as a block device — no image format overhead. Thin LVs give thin provisioning and snapshots; plain LVs give predictable thick allocation.

virsh pool-define-as vg_vms logical --source-name vg_vms --target /dev/vg_vms
lvcreate -V 100G -T vg_vms/pool0 -n vm1-disk0
virsh attach-disk vm1 /dev/vg_vms/vm1-disk0 vdb --persistent

Disable LVM scanning of guest LVs on the host (global_filter or devices file in lvm.conf), otherwise the host may activate VGs that live inside guest disks.

libvirt pool example

virsh pool-define-as vg_vms logical --source-name vg_vms --target /dev/vg_vms
virsh pool-start vg_vms ; virsh pool-autostart vg_vms
virsh vol-create-as vg_vms vm01-disk0 50G

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.
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 docHypervisor Storage current

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

Basis: https://pve.proxmox.com/pve-docs/chapter-pvesm.html · confidence 94%
Confirmation

Confirm action

Continue?