RAID-Z
From Pulsed Media Wiki
Contents
RAID-Z
RAID-Z is a data protection technology used by the ZFS file system. It is a variation of traditional RAID-5/RAID-6 but specifically designed to overcome the limitations and risks associated with conventional RAID, particularly the "write hole" problem.
RAID-Z integrates redundancy, performance, and data integrity within ZFS's architecture using copy-on-write and checksumming mechanisms.
Features
- Copy-on-write (COW) – All writes are atomic and written to new blocks, preventing corruption from incomplete writes.
- Checksumming – Every block of data is protected by a checksum, and data is self-healing using redundant copies.
- No write hole – Unlike traditional RAID, RAID-Z writes data and parity in a single atomic operation, eliminating the risk of mismatched data/parity.
- Dynamic striping – Automatically balances load across all available disks.
- Integrated into ZFS – No separate hardware controller or software layer is required.
RAID-Z Levels
ZFS supports three levels of RAID-Z:
Level | Parity | Fault Tolerance | Minimum Disks | Description |
---|---|---|---|---|
RAID-Z1 | Single parity | 1 disk failure | 3 | Similar to RAID-5 |
RAID-Z2 | Double parity | 2 disk failures | 4 | Similar to RAID-6 |
RAID-Z3 | Triple parity | 3 disk failures | 5 | Unique to ZFS; ideal for large arrays |
Example Configuration
Create a RAID-Z2 pool with four disks:
<syntaxhighlight lang="bash"> sudo zpool create mypool raidz2 /dev/sd[b-e] </syntaxhighlight>
Create a filesystem within the pool:
<syntaxhighlight lang="bash"> sudo zfs create mypool/data </syntaxhighlight>
Advantages over Traditional RAID
- Atomic writes prevent the RAID write hole
- Native integration with ZFS (no extra tools needed)
- Self-healing from silent data corruption
- More reliable parity management
- Better support for large storage volumes and modern use cases
Limitations
- No native support outside ZFS (tied to ZFS structure)
- More RAM usage (ZFS recommends at least 8 GB; more for deduplication)
- RAID-Z arrays cannot be shrunk or have disks removed (though vdevs can be added)
Use Cases
- Enterprise servers requiring high data integrity
- Backup and archival storage
- Virtualization hosts (e.g., Proxmox)
- NAS systems and home media servers using ZFS