A detailed case study of recovering a severely corrupted 12 TB btrfs multi-device pool (3 devices, data single, metadata DUP, DM-SMR disks) after a hard power cycle left the extent tree and free space tree unrecoverable by native tools. The author describes how `btrfs check --repair` entered an infinite loop of 46,000+ commits, destroying all backup_roots slots. Recovery was achieved using 14 custom C tools built against the btrfs-progs internal API, with final data loss of only ~7.2 MB out of 4.59 TB. The write-up proposes 9 specific improvements to btrfs-progs including progress detection in repair loops, new rescue subcommands, better EEXIST handling, and clearer documentation of backup_roots behavior. All custom tools are published under GPL-2.0.
Table of contents
One paragraph summaryFull analysisReference implementationHow I would like this to be receivedSort: