All systems operational

Pay with Bitcoin, Monero, USDT & 11 more · email-only sign-up

Storage & RAID

ZFS on storage servers: a pool layout that lasts

RAID-Z2 layouts for 8 and 14 drives, NVMe special vdevs, compression and scrubs.

8 min readReviewed 25 September 2026

About this guideGuide

Reading time
8 minutes
Written for
Debian 12 and 13, Ubuntu 24.04 and 26.04RHEL-family differences flagged in the text
Last reviewed
25 September 2026

Choose the layout

Order the server with “No RAID — ZFS-ready” so the drives are left untouched. With large hard drives, use RAID-Z2 (two drives of redundancy): a rebuild of a full 16–22 TB drive takes a day or more, and a second failure during that window must not cost you the pool.

ServerLayoutUsable
8 × 16 TBone 8-wide RAID-Z2≈ 96 TB
14 × 22 TBone 14-wide RAID-Z2 (max space)≈ 264 TB
14 × 22 TBtwo 7-wide RAID-Z2 (faster rebuilds, more IOPS)≈ 220 TB

Create the pool

Always use stable /dev/disk/by-id/ names, never sdX:

$ apt install zfsutils-linux
$ ls -l /dev/disk/by-id/ | grep -v part
$ zpool create -o ashift=12 -O compression=zstd -O atime=off \
    tank raidz2 /dev/disk/by-id/ata-DISK1 /dev/disk/by-id/ata-DISK2 … /dev/disk/by-id/ata-DISK8

Put metadata on NVMe

A mirrored special vdev on the NVMe drives stores metadata (and optionally small files), which makes directory listings and backups dramatically faster:

$ zpool add tank special mirror /dev/disk/by-id/nvme-A-part4 /dev/disk/by-id/nvme-B-part4
$ zfs set special_small_blocks=64K tank

A special vdev is part of the pool: if it is lost, the pool is lost. Always mirror it.

Keep it healthy

  • Scrub monthly: Debian and Ubuntu schedule it for you; check with zpool status.
  • Stay under 80% full: performance drops sharply beyond.
  • Use large records for backups and media: zfs set recordsize=1M tank/backups.
  • Encrypt sensitive datasets with -o encryption=aes-256-gcm -o keyformat=passphrase.