Skip to main content
RunBook Academy

Proxmox VEVII · Shared StorageBlock storage backends

LVM and LVM-thin as Proxmox storage

Advanced⏱ ~30 minpvesmlvslvcreate

What you'll learn

  • Distinguish the lvm and lvmthin plugins by what each one can and cannot do
  • Explain the cluster-wide locking that makes LVM over a shared LUN safe, and its one hard prerequisite
  • Create and monitor a thin pool, including the metadata percentage that data alarms miss
  • Describe what snapshots as volume chains changed for LVM in PVE 9
  • Choose between LVM-thin, shared LVM, ZFS and RBD for a given cluster

Prerequisites

Verified against Proxmox VE 9.2.4 · Proxmox Backup Server 4.2.5 · Ceph Squid / Tentacle · Debian 13 (Trixie) · Linux kernel 7.0 (PVE 9.2 default) · 2026-08-12

Not yet marked complete on this device.

Two storage plugins share a name and almost nothing else.

lvmthin is what a default Proxmox installation gives you: local, thin, snapshot-capable, and unable to be shared. lvm is the plugin you point at a SAN LUN: shared across the cluster, thick, and — since PVE 9 — snapshot-capable in a completely different way.

Confusing them produces designs that cannot do what the design document says they do, which is why this lesson keeps them apart from the first paragraph.

The two plugins side by side

lvmthinlvm
Typical useLocal storage on each nodeA shared iSCSI/FC/SAS LUN
Sharednopossible — when the underlying LUN is shared
Thin provisioningyes, in the poolno, at the LVM layer — the array may do it
Image formatsrawraw, and qcow2 for volume-chain snapshots
Snapshotsyes, native thin snapshotsyes, as volume chains, since PVE 9
Linked clonesyesno
Content typesimages, rootdirimages, rootdir
Live migration without disk copynoyes, when shared

Their configuration entries look almost identical, which is part of the problem:

lvmthin: local-lvm
        thinpool data
        vgname pve
        content rootdir,images

lvm: san-lun-a
        vgname san-vg-a
        content rootdir,images
        shared 1
        base iscsi-portal:0.0.0.scsi-360000000000000000000000000000001

The shared 1 line is the whole difference in behaviour, and the previous part established what it means: an assertion that every node sees the same data, which PVE acts on without verifying.

LVM over a shared LUN, and the lock

The arrangement is straightforward. A SAN presents one large LUN to every node in the cluster. Each node sees the same block device. LVM on top of it splits the LUN into logical volumes, one or more per guest, and PVE names them vm-<VMID>-<NAME>.

The obvious question is what stops two nodes writing LVM metadata at the same time and corrupting the volume group. The documentation answers it directly: the backend implements proper cluster-wide locking if the storage is marked as shared in the configuration.

Configuration changeadd a shared LVM storage over an existing SAN volume group
pvesm add lvm san-lun-a \
--vgname san-vg-a \
--content images,rootdir \
--shared 1

pvesm status --storage san-lun-a
Read-only / Safeconfirm every node really does see the volume group
vgs -o vg_name,vg_size,vg_free,pv_count

pvs -o pv_name,vg_name,pv_size

pvesm status --storage san-lun-a

LVM-thin: the local default

A default Proxmox VE installation creates a pve volume group with a thin pool called data, and registers it as the local-lvm storage. Building one by hand is two commands:

Destructivecreate a thin pool in an existing volume group
VG=pve
POOL=data

vgs "$VG"

lvcreate -L 100G -n "$POOL" "$VG"
lvconvert --type thin-pool "$VG/$POOL"

lvs -o lv_name,lv_size,data_percent,metadata_percent "$VG"
Configuration changeregister the thin pool as a PVE storage
pvesm add lvmthin local-lvm \
--vgname pve \
--thinpool data \
--content images,rootdir

pvesm status --storage local-lvm

The thin pool has two ways to fill

This is the part that costs people a weekend, and it is not the one they monitor.

A thin pool has two allocated areas: the data area, which holds guest blocks, and a separate metadata area, which holds the mapping from logical blocks to physical ones. Both can fill. Only the first is what pvesm status and most dashboards show.

Read-only / Safethe only thin-pool health command that matters
lvs -o lv_name,lv_size,data_percent,metadata_percent,lv_metadata_size,snap_percent

lvs -a -o lv_name,pool_lv,lv_size,data_percent | head -30
Read-only / Safe
$ lvs -o lv_name,lv_size,data_percent,metadata_percent,lv_metadata_size
  LV            LSize    Data%  Meta%  LMSize
data          <1.72t   39.96  94.12  120.00m
root          96.00g
swap           8.00g
vm-141-disk-0 500.00g  22.40
vm-142-disk-0 500.00g  18.05

saferemove, and what it costs

Both plugins accept saferemove, documented as zeroing out data when removing logical volumes so that it cannot be accessed by other LVs created later.

That is a real concern on multi-tenant or regulated estates: without it, a newly created volume can contain the previous volume’s blocks, and a guest that reads its own unwritten disk sees somebody else’s data.

The cost is time and I/O. Removing a 2 TB volume means writing 2 TB of zeroes, throttled by saferemove_throughput (up to 10 MiB/s by default) and stepped by saferemove-stepsize (up to 32 MiB by default). At the default throughput, that 2 TB removal takes days.

The decision is therefore not “should data be erased” but “where”. On a multi-tenant estate, enable it and size the throughput deliberately. Elsewhere, consider whether encryption at rest, or the array’s own crypto-erase, answers the same question at a fraction of the cost.

Key takeaways

  • lvmthin and lvm are different products with similar names. Thin is local, thin-provisioned, snapshot- and linked-clone-capable. Plain LVM over a shared LUN is shared and thick.
  • Shared LVM is safe because PVE implements cluster-wide locking when the storage is marked shared, using pmxcfs rather than cLVM or a separate lock manager. The lock therefore depends on quorum.
  • That lock protects PVE’s operations from each other and nothing else. The LUN must be presented to this cluster alone; a second writer destroys the volume group metadata.
  • A thin pool has a data area and a separate metadata area, and metadata fills first under snapshot-heavy workloads. Alarm on metadata_percent, not only data_percent. Repairing metadata needs the pool inactive.
  • PVE 9 gave LVM snapshots as volume chains — a separate volume per snapshot, layered with qcow2 — rather than classic LVM snapshots, which degrade the whole volume group. Chains are walked on read, so prune them.
  • LVM over a thin-provisioned array reports the LUN’s size, not the array’s free space. The array needs its own capacity alarm.
  • saferemove zeroes removed volumes and is throttled to 10 MiB/s by default, so a large removal takes a very long time. Decide it deliberately.
  • Never mark an LVM-thin storage shared.

Knowledge check

Knowledge check · 5 questions

  1. Q1. What makes LVM over a shared SAN LUN safe against two nodes corrupting the volume group metadata?

  2. Q2. A 1.7 TiB LVM-thin pool at 40% data usage suddenly stops accepting writes and guests start failing. The capacity dashboard shows 40%. What has happened?

  3. Q3. Which statements about snapshots as volume chains, added for LVM in PVE 9, are correct? Select all that apply.

  4. Q4. An LVM-thin storage can be marked shared to allow live migration without disk copy, provided the underlying disks are on a SAN.

  5. Q5. A node running guests on shared LVM loses quorum. What is the correct response?

Passing score: 75%. Answers are checked in this browser.