RAIDZ
conceptRAIDZ protects a team of disks with recovery math instead of full copies: alongside your data it stores enough extra information that if a disk dies, everything on it can be recomputed from the survivors. RAIDZ1 survives one dead disk, RAIDZ2 two, RAIDZ3 three—and you keep much more usable space than mirrors give you.
Two things the space math hides. First, the good news: ZFS fixed the famous flaw of older systems built this way (a crash at the wrong instant could silently corrupt them—the "write hole"; ZFS's never-overwrite habit makes it impossible). Second, the catch that decides real setups: a RAIDZ team, no matter how many disks are in it, handles scattered small requests at roughly the pace of a single disk—because every request needs the whole team. Wonderful for big libraries read start-to-finish; wrong for virtual machines and databases.
Choosing within the family:
- RAIDZ1—one parity disk. With today's drive sizes, a resilver reads many TB from every survivor for hours or days; a second failure or read error in that window costs data. Fine for genuinely rebuildable bulk; nervous territory for anything else.
- RAIDZ2—the homelab default for bulk storage vdevs (classic shape: 6–8 disks). Two-failure tolerance is what makes the resilver window boring instead of frightening.
- RAIDZ3—for wide vdevs and long resilvers at scales most homelabs don't reach.
Use it where it's strong: media libraries, backup targets, archives—big sequential reads and writes, where bandwidth is fine and IOPS don't matter. Keep VMs and databases off it (that's what mirror vdevs are for).
Its standing confusions:
- "More spindles = faster"—true across vdevs, false within a RAIDZ: every random read touches every data disk in the stripe, so the vdev moves as one unit at one disk's cadence. Width buys capacity and bandwidth, not IOPS.
- vs mirrors—the recurring decision. Capacity efficiency vs IOPS, slow reconstructive resilvers vs fast copy resilvers, rigidity vs flexibility. The workload decides; wanting one pool to do both jobs well is how people end up disappointed.
- Growth—the old absolute "you can never expand a RAIDZ" died in OpenZFS 2.3 (see RAIDZ Expansion), but width is still mostly a creation-time decision, and type (Z1→Z2) still can't change in place.
The write hole, and how CoW dissolves it: RAID5 updates in place—write data, then parity—so a crash between the two leaves a stripe whose parity lies, silently, discovered only when a rebuild reconstructs garbage from it. Battery-backed controllers existed to paper over exactly this. RAIDZ never updates a stripe in place: each logical block becomes its own variable-width stripe (data + parity sized to fit), written whole to fresh space and committed by the same atomic pointer flip as everything else in ZFS. No stripe is ever half-new; the transaction either points at it or doesn't.
Variable width is also why the IOPS ceiling: one logical block spans the vdev's data disks, so one random read is a coordinated act by all of them—the stripe is the unit of retrieval. And it explains the odd capacity arithmetic (parity overhead varies with block size—small blocks carry proportionally more parity), which is why RAIDZ capacity calculators hedge where mirror math is exact. Every RAIDZ quirk traces back to the same design move: making the stripe a creature of the write, not of the disk layout.