Skip to content

Writing criteria for this guide

Every "for Mere Mortals" guide is written to the same nine-point standard, so a reader who trusts one can trust the rest. Here it is, with the verification notes for this particular guide below.

  1. Fix it first. Reader outcomes lead, not action items: each chapter opens by naming the outcome it delivers, shows a check the reader can run to confirm they got it, and a reasonable reader finishes able to state what was done, what it means, and what to try next.
  2. Plain language. Short sentences, everyday vocabulary, technical terms defined on first use. No slang, and no idioms that only make sense in one country — the reader may be translating as they go.
  3. No dead ends. A guide never tells the reader to do something it cannot show them how to verify. Every claim a reader relies on — an install, a command, an output — is something this guide demonstrates or clearly labels documented-only below.
  4. Live-verified where it matters. Procedures are run for real in the guide's lab wherever the build machine allows it, and the transcripts kept in the repository are the evidence. What could not be run is listed honestly below, never presented as if it had been.
  5. General audiences. Nothing in this guide — examples, fixtures, names, addresses — is modelled on any particular reader or author's real life, network, or organisations. The lab's filesystems are built from invented fixtures on image files, and hold nothing else.
  6. Standalone. A reader needs this guide, its lab, and nothing else. Where another guide would genuinely help, it is pointed to once, by name, and the chapter still completes without it.
  7. Honest about limits. Chapter 14 names what the tool cannot do: snapshots mistaken for backups, checksums that detect without a second copy to repair from, the RAID5/6 write hole, workloads that fight copy-on-write, quota costs, and repair's ceiling — damage no tool can undo.
  8. The safety rule is in the text, early. Chapter 1 and the README state the rule plainly — a snapshot is not a backup; copies on the same disk die with the disk — before any procedure depends on it, and later chapters point back to it where a snapshot's convenience would make forgetting it easy.
  9. Builds clean. The site builds with MkDocs in strict mode with no warnings, and a fresh reader following the chapters in order reaches the stated outcome of each.

Verification notes for this guide

The build machine is a Linux sandbox (kernel 7.0.0-39) with btrfs-progs 6.6.3, installed from the distribution's packages. The sandbox grants no loop devices and no permission to mount filesystems or to create subvolumes on its own (host-provided) btrfs — the refusals are recorded in transcript t00. The lab's standing rule followed from that: every write operation ran on image files; no real disk was ever written to, mounted, or put at risk. All transcripts live in btrfs-lab/transcripts/.

Run for real, with transcripts as evidence:

  • Environment and its boundaries: versions, the missing loop devices, and the refused subvolume creation on the host filesystem (t00).
  • mkfs.btrfs on a single image: label, UUID, default profiles (data single, metadata and system DUP), then the same filesystem met again through btrfs filesystem show, dump-super, and a clean read-only btrfs check (t01).
  • Multi-device creation: RAID1 over two images and RAID10 over four, and the checksum choice made at mkfs time — crc32c (4-byte sums) versus sha256 (32-byte), read back from the superblocks (t02).
  • A reporting tool's crash, kept as evidence: btrfs filesystem show segfaulted on the multi-device image set while check and dump-super read the same filesystem clean (t02b).
  • A filesystem with real files and no mount anywhere: mkfs.btrfs --rootdir filled it from a fixture tree, and btrfs restore read the whole tree back — diff -r silent and all four sha256 hashes matching (t03). The destination directory must exist before restore fills it; the lab's first, failing attempt is kept in the transcript.
  • Checksum detection of rot: four bytes flipped inside a copy's file data; the plain check stayed silent, the --check-data-csum run named the byte range and both checksums, and the salvaged file differed from the original at exactly the flipped byte (t04).
  • Superblock loss and recovery: a copy's primary superblock magic zeroed; check refused the image, check --super 1 opened the backup superblock clean, and restore recovered every file through the backup (t05).
  • btrfs check --repair invoked on the data-damaged copy: warning and countdown recorded, trees found sound, nothing to rebuild, and the rotten file data left exactly as found — repair rebuilds structure, not lost bytes (t08).
  • An honest null result: btrfstune -u was run repeatedly and never once observed to finish in this sandbox (runs were still going after more than an hour when put down), and after the attempts the image was byte-identical to its source, md5-proven. The UUID change did not land here and is not claimed (t06).
  • Read-only reporting against the sandbox's own btrfs: findmnt identifies it; the filesystem df and device stats ioctls were refused for want of privilege, and the refusals are the transcript (t07).

Documented only — described from the project's documentation, not run, and the text does not claim otherwise:

  • Everything that needs a mount: mounting itself, subvolume creation and layout (chapter 5), snapshots and rollback (chapter 6), send and receive (chapter 7), adding and removing devices and profile conversion on a live filesystem (chapter 8), scrub and balance (chapter 9), quotas and qgroups (chapter 10), degraded mounting, and device failure under real load. Their procedures are the standard documented ones, unchanged.
  • btrfs check --repair was run on the data-damaged copy: its warning and countdown are recorded, it found the trees sound and fixed nothing, and the rotten data stayed rotten (t08). Repair of tree damage is not claimed as evidence; chapter 11 accordingly presents repair as a last resort behind imaging and restore, and the recoveries the chapter does claim (backup superblocks, restore) are the ones transcripts t04 and t05 demonstrate.
  • btrfs rescue super-recover writing a good superblock back over a bad one: under btrfs-progs 6.6.3 it refused the lab's image (t05); the demonstrated paths are check --super and restore's backup-super fallback.
  • Changing a filesystem's UUID with btrfstune (see the null result above).
  • The comparison tools in chapter 13 are characterised, not benchmarked.

Fixtures are this guide's own and deliberately generic: a four-file tree of invented documents (a plan, a list, a field note, and twenty thousand random bytes standing in for a photograph), created for the lab and hashed before use. No example is modelled on any real person, organisation, network or disk, and no real disk was ever the target of a command in this guide.