Remote Support Start download

ZFS RAID Levels Explained: RAID-Z1, Z2, Z3 and Mirror Compared

TrueNASZFSStorageBackup
ZFS RAID Levels Explained: RAID-Z1, Z2, Z3 and Mirror Compared

ZFS doesn’t use traditional hardware RAID controllers but implements redundancy directly in the filesystem. The ZFS RAID levels — RAID-Z1, RAID-Z2, RAID-Z3, and Mirror — offer different trade-offs between capacity, performance, and fault tolerance. The right choice depends on drive count, drive capacity, and availability requirements.

Why No Hardware RAID with ZFS?

ZFS needs direct access to physical drives. A hardware RAID controller hides individual drives behind a virtual volume — causing ZFS to lose core capabilities:

  • Checksums: ZFS verifies every data block’s integrity. With hardware RAID, ZFS cannot detect silent data corruption.
  • Self-healing: ZFS can automatically repair corrupted blocks from redundancy — only with direct drive access.
  • Flexible expansion: ZFS pools can be expanded with new vdevs without reconfiguring the RAID controller.

The recommendation: Use HBA controllers (Host Bus Adapters) in IT mode or JBOD mode. The HBA passes drives directly to ZFS.

ZFS RAID Levels

Mirror (RAID 1)

A mirror consists of 2 or 3 identical copies of every data block.

  • Minimum: 2 drives
  • Redundancy: 1 drive may fail (2-way mirror), 2 drives (3-way mirror)
  • Usable capacity: 50% (2-way) or 33% (3-way)
  • Read performance: Excellent — ZFS reads from both/all mirrors in parallel
  • Write performance: Good — data is written simultaneously to all mirrors
  • Rebuild time: Fast — only the failed drive’s data needs to be copied

Recommendation: Ideal for small setups (2–4 drives), boot drives, SSDs, and log devices (SLOG/ZIL). For SSDs, mirror is the standard since the capacity loss matters less with fast media.

RAID-Z1 (Similar to RAID 5)

RAID-Z1 distributes data and one parity block across all drives in a vdev.

  • Minimum: 3 drives (recommended: 3–5)
  • Redundancy: 1 drive may fail
  • Usable capacity: (n−1)/n — e.g., 80% with 5 drives
  • Read performance: Good — fast sequential, IOPS scalable by stripe width
  • Write performance: Good — parity is calculated on every write
  • Rebuild time: Medium to long — all data from all drives is read

Recommendation: For non-critical data or when a second backup copy exists. For drives 4 TB and above, we advise against RAID-Z1 — rebuild time with large drives takes hours to days, and a second failure during rebuild results in data loss.

RAID-Z2 (Similar to RAID 6)

RAID-Z2 uses two parity blocks per stripe.

  • Minimum: 4 drives (recommended: 4–8)
  • Redundancy: 2 drives may fail simultaneously
  • Usable capacity: (n−2)/n — e.g., 75% with 8 drives
  • Read performance: Good — comparable to RAID-Z1
  • Write performance: Slightly lower than Z1 — two parity calculations
  • Rebuild time: Long — but a second failure is tolerated during rebuild

Recommendation: The standard for production data with 4+ drives. Especially important with large HDDs (8+ TB) where rebuild time spans several hours to days. RAID-Z2 is the best compromise between capacity and safety.

RAID-Z3 (Triple Parity)

RAID-Z3 uses three parity blocks per stripe.

  • Minimum: 5 drives (recommended: 6–12)
  • Redundancy: 3 drives may fail simultaneously
  • Usable capacity: (n−3)/n — e.g., 75% with 12 drives
  • Read performance: Good
  • Write performance: Somewhat lower than Z2
  • Rebuild time: Very long — but still protected even with two simultaneous failures

Recommendation: For very large vdevs (8+ drives) with large HDDs (12+ TB). With drives of this capacity, a rebuild takes so long that statistically another failure may occur during the process. RAID-Z3 ensures that even then no data is lost.

Capacity Calculation

ConfigurationDrivesUsable CapacityTolerable Failures
2× Mirror2× 16 TB16 TB (50%)1
3× RAID-Z13× 16 TB32 TB (67%)1
4× RAID-Z14× 16 TB48 TB (75%)1
4× RAID-Z24× 16 TB32 TB (50%)2
6× RAID-Z26× 16 TB64 TB (67%)2
8× RAID-Z28× 16 TB96 TB (75%)2
6× RAID-Z36× 16 TB48 TB (50%)3
10× RAID-Z310× 16 TB112 TB (70%)3
12× RAID-Z312× 16 TB144 TB (75%)3

vdev Width: How Many Drives Per vdev?

The optimal number of drives per vdev depends on the RAID level:

  • Mirror: 2 (standard) or 3 (high availability)
  • RAID-Z1: 3–5 drives (no more — rebuild risk increases)
  • RAID-Z2: 4–8 drives
  • RAID-Z3: 6–12 drives

Rule of thumb: Divide the total number of drives by the vdev width to determine the number of vdevs. A pool with 12 drives can be configured as 2× 6-drive RAID-Z2 or 3× 4-drive RAID-Z2.

More vdevs = more IOPS (write operations are distributed across vdevs). But: a vdev is the smallest redundancy unit — if a vdev fails completely, data is lost.

Striped Mirror vs RAID-Z

For high random IOPS (databases, VMs), striped mirrors are often better than RAID-Z:

Pool with 8 drives:
Option A: 1× RAID-Z2 (8 drives) → ~6× sequential speed, ~1× random IOPS
Option B: 4× Mirror (2 drives each) → ~4× sequential speed, ~4× random IOPS

RAID-Z always writes a full stripe — even for small blocks. Mirrors only write the affected blocks. For VM storage (many small reads/writes), mirrors are therefore often more performant.

Recommendations by Use Case

ApplicationRecommended LayoutRationale
NAS/File serverRAID-Z2 (6–8 HDDs)Best capacity utilization with good safety
VM storage (Proxmox)Mirror (SSDs)Maximum IOPS for VM workloads
Backup target (PBS)RAID-Z2 (4–8 HDDs)Capacity more important than IOPS
DatabaseMirror (SSDs)Random IOPS critical
Archive (cold storage)RAID-Z3 (8–12 HDDs)Maximum safety with large drives
Boot driveMirror (2× SSD)Simple, fast, redundant

Frequently Asked Questions

Can I change the RAID level later?

No — the RAID level of an existing vdev cannot be changed. The pool must be recreated. This makes initial planning critical. Since OpenZFS 2.3, however, vdevs can be expanded with additional drives (RAIDZ Expansion).

How long does a rebuild take?

Depends on drive size and speed: A 16 TB HDD at ~200 MB/s takes approximately 22 hours for a resilver (ZFS rebuild). A 2 TB SSD at 500 MB/s takes only ~1 hour.

What’s better: RAID-Z2 or 3-way mirror?

Both tolerate 2 failures. RAID-Z2 offers more capacity (e.g., 67% with 6 drives vs. 33% with 3-way mirror). 3-way mirror offers better random IOPS. For capacity → Z2, for performance → mirror.

Do I still need a backup?

Yes — RAID (any level) protects against drive failure, not against accidental deletion, ransomware, or fire. A RAID level does not replace a backup. The 3-2-1 rule applies regardless of RAID level.


Planning a TrueNAS storage system and unsure which RAID level is right? Contact us — we size the pool to match your workload.

Need IT consulting?

Contact us for a no-obligation consultation on Proxmox, OPNsense, TrueNAS and more.

Get in touch