Writing

Essays

Things I have learned. Things I built, broke, and eventually figured out.

  1. A key wrapped in a key wrapped in a key Jul 21, 2026 · 9 min You type one passphrase, but ZFS native encryption juggles three kinds of key: a wrapping key derived from what you know, a random master key it guards, and a per-dataset data key derived from that. The indirection isn't bureaucracy — it's what makes changing a passphrase instant, inheritance sane, and 'send an encrypted backup to a machine you don't trust' a one-flag operation. Here's the whole hierarchy, the GCM authentication underneath, why copy-on-write lets ZFS reuse a per-block IV safely, and an honest account of what the encryption does not hide. cryptography · security · zfs
  2. Two disks down, still standing Jul 21, 2026 · 8 min The obvious way to survive two dead disks — add a second parity column — fails for a reason worth understanding: a second XOR is the same equation twice. RAIDZ2's fix is to compute its second parity in a finite field, GF(2⁸), weighting each disk by a distinct power of a generator. That turns two dependent equations into an always-solvable 2×2 system. Here's the field, the syndromes, the full reconstruction, and a playground where you can take out any two disks and watch the algebra put them back. math · storage · zfs
  3. One extra disk, one equation Jul 21, 2026 · 8 min RAIDZ1 survives a dead drive by keeping a single parity column that is nothing more exotic than the running XOR of the others. That one equation buys back any missing disk — but only when you already know which one lied, and that is the quiet reason ZFS pairs its parity with a checksum. Here's the algebra, the erasure-vs-error distinction that decides everything, and a live playground where you can kill a disk and watch it come back. math · storage · zfs