Skip to main content
RunBook Academy

Proxmox VEVI · ZFSZFS in Proxmox

ZFS as Proxmox storage (local-zfs, replication)

Intermediate⏱ ~16 min

What you'll learn

  • Create a ZFS storage entry in Proxmox
  • Choose between ZFS datasets file mode and zvols (block mode)
  • Use ZFS replication to copy VMs to a peer node
  • Configure thin provisioning and over-provisioning safely

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.

Why this matters in production

ZFS is the default local storage for most Proxmox deployments. Using it correctly means predictable performance and the ability to replicate VMs to peer nodes for HA-style recovery without shared storage.

The two ZFS storage modes

Proxmox exposes a ZFS pool in two ways:

ModeWhat it isUsed for
zfspoolThe whole pool is a Proxmox storage; VMs use zvol (block)Direct VM disk creation
ZFS dataset + DirectoryA dataset under a pool, exposed as directory storageTemplates, ISOs, file-based workloads

The default local-zfs storage on a Proxmox install is zfspool mode — every VM disk is a zvol.

Configuring local-zfs

The installer usually creates local-zfs automatically. Verify:

cat /etc/pve/storage.cfg
zpool status rpool && zfs list -t volume

If you want a separate pool for VM storage (recommended for larger deployments):

pvesm add zfspool vmdata --pool tank --content images,rootdir

Zvols

A zvol is a ZFS block device. Proxmox creates one per VM disk.

zfs list -t volume -o name,volsize,refreservation,compression

Properties to know:

  • volsize — virtual size of the block device.
  • refreservation — actual space reserved on the pool (for thick provisioning).
  • compression — default lz4 (very fast, modest ratio).
  • volblocksize — block size. Defaults to 16 KiB on OpenZFS 2.2 and later, which includes the ZFS 2.4 that PVE 9.2 ships; it was 8 KiB before that. Fixed once the volume has been written.
  • primarycache / secondarycache — caching settings; defaults are usually correct.
  • thin provisioning — leave refreservation unset; the zvol grows on demand.

The Proxmox storage option that controls this is sparse, documented as “Use ZFS thin-provisioning. A sparse volume is a volume whose reservation is not equal to the volume size.” The blocksize option sets the volblocksize of new zvols on this storage; the block-size tuning lesson covers how to choose it.

Read-only / Safehow over-provisioned is the pool actually?
POOL=tank

zpool list -o name,size,alloc,free,capacity,fragmentation "$POOL"

zfs list -t volume -o name,volsize,used,refreservation -r "$POOL"

# total provisioned vs total available
zfs list -Hp -t volume -o volsize -r "$POOL" |
awk '{s+=$1} END {printf "provisioned: %.1f TiB\n", s/1024/1024/1024/1024}'

ZFS replication

ZFS replication copies a VM’s zvol to a peer node at regular intervals. It uses zfs send / zfs receive over SSH.

flowchart LR
  A[pve-01 source zvol] -->|zfs send| B[SSH]
  B --> C[pve-02 destination zvol]

Replication schedule:

pvesr create-local-job 100 pve-02 --schedule '*/15' --rate 50
pvesr status

After replication, the VM can be recovered on the peer node even if the source is gone — this is the foundation for “manual HA” without shared storage.

Snapshot + send/receive

A more flexible pattern:

zfs snapshot tank/vm-100-disk-0@before-upgrade
zfs send tank/vm-100-disk-0@before-upgrade | ssh pve-02 'zfs receive tank/vm-100-disk-0@before-upgrade'

Production considerations

Common mistakes

  • Putting VMs on the root pool.
  • Setting refreservation on every zvol (thin pool never over-commits but capacity is hidden).
  • Treating ZFS replication as HA.
  • Copying volblocksize=8K from advice written before OpenZFS 2.2. The default is 16 KiB now, and 8 KiB costs capacity on RAIDZ.

Key takeaways

  • zfspool exposes a ZFS pool as block storage for VMs.
  • Zvols are ZFS block devices; use them for VM disks.
  • ZFS replication copies a VM’s zvol to a peer; recovery is manual.
  • Compression is free; use it.

Knowledge check

Knowledge check · 4 questions

  1. Q1. Which Proxmox storage type exposes a ZFS pool as block storage?

  2. Q2. ZFS replication is asynchronous, so recovering on the peer node is a manual step.

  3. Q3. What is a zvol?

  4. Q4. A thin-provisioned ZFS pool has reached 100%. Every VM on it is frozen. An operator deletes 200 GB of log files inside one of the guests. What happens to the pool?

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