Hardware RAID controllers have been the standard for redundancy for decades, but they have a fatal flaw: they are blind to the content of the data. A controller merely shifts zeros and ones without knowing whether it’s a critical database log or empty storage space.
ZFS (Zettabyte File System) and its RAID-Z implementation break with this paradigm by merging the logical volume manager and the file system. The result is an architecture that not only compensates for failures but actively combats silent data corruption.

"Write Hole": An Explanation of Copy-on-Write
RAID-Z is not software-based RAID 5, even though the parity logic may seem similar. The key architectural difference lies in the write behavior. Classic RAID arrays suffer from the 'write hole' problem: if power is lost during a write operation, the data block and parity block may no longer match. The array becomes inconsistent.
ZFS eliminates this risk through Copy-on-Write (CoW). When you modify a file, ZFS never overwrites the original data blocks. Instead, the change is written to a new block. Only once this write operation (including the new checksum) is successfully completed is the metadata pointer updated to point to the new block. This is an atomic operation. Either the write operation is fully successful, or logically it never happened. A corrupt intermediate state is technically impossible.

Dynamic stripes instead of rigid blocks
Another limitation of traditional controllers is the fixed stripe size. RAID-Z uses a dynamic stripe width. Each logical block is written as its own data set. This means ZFS dynamically adjusts the stripe width to match the data being written. As a result, performance penalties from read-modify-write cycles during small random writes are significantly reduced, as the system intelligently determines how data and parity are distributed across the physical disks.
Integrity via Merkle Tree (Self-Healing)
The often-cited "self-healing" is based on a hash tree structure (Merkle Tree). Unlike conventional file systems, ZFS does not store a data block’s checksum within the block itself but in its parent metadata block (Parent Pointer).
When the system reads data, it calculates the checksum of the read bits and compares it with the checksum stored in the parent block. If they do not match, a 'silent data corruption' (bit rot) has occurred. Since ZFS knows the data topology, it immediately discards the corrupted block. It accesses the parity information from the other drives in the array (vdev), reconstructs the correct bitstream, and overwrites the corrupted sector on the disk with the valid data. This process occurs fully automatically within the I/O path.

RAID-Z vs. RAID-Z2 vs. RAID-Z3: Which to Choose?
The choice of RAID-Z level is a trade-off between raw capacity, performance, and the statistical probability of a URE (Unrecoverable Read Error) during a rebuild. All drives are organized into Virtual Devices (vdevs).
RAID-Z1 (Single Parity)
This uses one parity block per stripe, allowing for the failure of a single disk.
- For modern drives (> 4 TB), Z1 is often negligent. If a drive fails, the entire array must be resilvered (restored). If a single read error occurs on another drive during this massive read load, the pool is usually lost. Use case: Exclusively small SSD arrays or non-critical data.
RAID-Z2 (Dual Parity)
Z2 uses two parity blocks and can tolerate the failure of any two disks in the vdev.
- This is the industry standard. Even if a drive fails and a read error occurs on a second drive during the rebuild, the remaining parity data ensures integrity. The ratio of capacity loss to security is best balanced here.
RAID-Z3 (Triple Parity)
Three parity blocks allow for the failure of three drives.
- The computational load for parity calculation increases significantly here, which can reduce performance (especially IOPS). Z3 is designed for extremely large arrays with very large HDDs (e.g., 20TB+), where rebuild times can take days or even weeks, and the statistical risk of further failures increases significantly.
The direct comparison:
| Feature | RAID-Z (Z1) | RAID-Z2 | RAID-Z3 |
| Analogie | Ähnlich wie RAID 5 | Ähnlich wie RAID 6 | Einzigartig für ZFS |
| Parität | Einfache Parität (1 Block) | Doppelte Parität (2 Blöcke) | Dreifache Parität (3 Blöcke) |
| Fehlertoleranz | 1 Laufwerk kann ausfallen | 2 Laufwerke können ausfallen | 3 Laufwerke können ausfallen |
| Mindestanzahl Disks | 3 Laufwerke | 4 Laufwerke | 5 Laufwerke |
| Einsatzgebiet | Geschwindigkeit & Kapazität wichtiger als extreme Sicherheit | Der "Sweetspot" für Sicherheit und Leistung | Maximale Sicherheit für sehr große Arrays |
RAID-Z data recovery
Despite the robustness of ZFS, there are scenarios that require manual intervention. We distinguish between physical failure and logical corruption.
Scenario A: Physical Drive Failure When the system marks a disk as FAULTED, the pool continues to operate in "Degraded" mode. Parity is calculated in real time to serve read requests. You replace the hardware and initiate the "Resilver" process. ZFS only copies the actually used data, not the empty blocks (a massive time advantage over traditional RAID rebuild).

Scenario B: Metadata Loss If the file system is so severely corrupted that the pool can no longer be mounted (e.g., due to controller errors writing garbage data), standard tools like zpool scrub often fail because the entry point to the Merkle tree is missing.
In cases where zpool import fails, specialized forensic software is required that understands the on-disk structure of ZFS and can assemble fragments without intact metadata pointers. Tools like DiskInternals RAID Recovery address this by scanning the raw disk data and attempting to manually chain transaction groups (TXGs) to extract files. However, this is the last line of defense before a backup restore.
Conclusion
RAID-Z is more than just storage aggregation—it’s a lifeline for data integrity. Choosing ZFS over hardware RAID is a commitment to data consistency. In production environments, you should avoid RAID-Z1 and opt for RAID-Z2 to mitigate the mathematical inevitability of read errors on large drives. Software-defined storage demands more RAM and CPU power, but it repays this with mathematically provable data correctness.
Do you want me to calculate how net capacity and failure probability compare between RAID-Z2 and Z3 for your specific hardware configuration?