Back to Knowledge Base
storageNODE: #zpool

ZFS Storage Pools (zpool) & VDEVs

The storage aggregation layer in ZFS that combines physical drives into Virtual Devices (VDEVs) to provide shared, elastic capacity.

AKA:zpool, ZFS Pool, VDEV, Virtual Device
#storage#zfs#zpool#vdev#raidz#disks

ZFS Storage Pools (zpool) & VDEVs

Overview

A zpool (storage pool) is the top-level container in ZFS that aggregates physical storage drives into a unified storage space. File systems (datasets) and block devices (zvols) draw storage dynamically from the pool rather than from fixed disk partitions.

Virtual Devices (VDEVs)

A pool is constructed from one or more VDEVs (Virtual Devices). Data is striped across all top-level VDEVs in a pool.

Types of VDEVs:

  1. Mirror:
    • 2-way or 3-way mirroring (similar to RAID 1/10).
    • High random IOPS performance and fastest resilvering times.
  2. RAID-Z1 / RAID-Z2 / RAID-Z3:
    • Single, double, or triple parity protection (analogous to RAID 5 and RAID 6).
    • Solves the classic hardware RAID “write hole” bug using dynamic stripe widths.
  3. dRAID (Distributed RAID):
    • Modern OpenZFS feature that distributes spare capacity across all disks in the array, dramatically reducing rebuild (resilver) times under drive failure.
  4. Special VDEVs:
    • SLOG (Separate ZFS Intent Log): Fast, low-latency NVMe dedicated to synchronous write transactions.
    • L2ARC (Level 2 ARC): SSD read cache extending RAM-based ARC.
    • Special Allocation Class (Metadata VDEV): Fast NVMe drives dedicated strictly to pool metadata and small files.

Common Management Commands

  • zpool create <pool_name> mirror /dev/sda /dev/sdb: Create a mirrored pool.
  • zpool status: Inspect pool health, VDEV status, and check for I/O or checksum errors.
  • zpool list: View capacity, allocation, fragmentation, and deduplication ratios.
  • zpool scrub <pool_name>: Initiate an integrity check across all blocks.