Storage has always had the same enemies: disks that lie, writes cut short, and crashes in the middle of an update. ZFS answers them with a handful of ideas, and Uberblok, an interactive museum built by a longtime storage engineer, shows them one room at a time, drawn directly from the code that implements them. Every animation maps to lines of Open ZFS zfs-2.4.4, frozen at commit 71a9f9578616, and every excerpt links back to the source. The author, who admires ZFS as the most impressive piece of engineering in the field, built the project to pay homage to it and to better understand its internals, and welcomes corrections from readers who know the code better.
The museum opens in the Hall with the uberblock, the small record that names the root of an entire pool. It holds a transaction group number, ub_txg, and a block pointer, ub_rootbp, from which every other block is reachable. Each disk carries four labels, each with a 128 KiB ring of uberblocks. A new uberblock never overwrites the previous one; instead it takes slot N mod the number of slots. On import, ZFS reads every slot and keeps the valid uberblock with the highest txg.
Further rooms cover the history of the project, the tree and how copy-on-write, checksums and self-healing keep a pool consistent without fsck, transaction groups moving through open, quiescing and syncing states, and the vdev hierarchy including mirror, raidz, draid, log, cache and special devices. The museum also explains RAID-Z, snapshots, the ARC, metaslabs, the ZIL, and send/receive, all with animated diagrams.
The project is available at uberblok.storagebits.workers.dev, and its source is on GitHub under algotitanhq/uberblok.
Source: Hacker News · Summarized by HeadlinesBriefing