Bringing bcachefs to the mainline
Bringing bcachefs to the mainline
Posted May 24, 2022 15:22 UTC (Tue) by Wol (subscriber, #4433)In reply to: Bringing bcachefs to the mainline by xanni
Parent article: Bringing bcachefs to the mainline
If you've got raid-1, the checksum identifies which copy is corrupt and therefore which copy is correct. If you've got raid-6, then you can solve the equations to get your data back. But raid-5? Sorry, unless that checksum tells you which disk block is corrupt, you're stuffed.
Cheers,
Wol
Posted May 24, 2022 16:02 UTC (Tue)
by xanni (subscriber, #361)
[Link] (3 responses)
Posted May 24, 2022 16:15 UTC (Tue)
by xanni (subscriber, #361)
[Link] (2 responses)
Posted May 24, 2022 20:28 UTC (Tue)
by Wol (subscriber, #4433)
[Link] (1 responses)
Cheers,
Posted May 24, 2022 21:18 UTC (Tue)
by zblaxell (subscriber, #26385)
[Link]
Strictly speaking, the csum is on the extent, not the file, which only matters when things like snapshots and dedupe make lots of files reference the same physical disk blocks, or compression transforms the data before storing it on disk. There's a single authoritative csum that covers all replicas of that block, whether they are verbatim copies or computed from other blocks. That csum is itself stored in a tree with csums on the pages.
There are no csums on the parity blocks, so btrfs's on-disk format cannot correctly identify the corrupted disk in RAID[56] if the parity block is corrupted and some of the data blocks in the stripe have no csums (either free space or nodatasum files). It's possible to determine that parity doesn't match the data and the populated data blocks are correct, but not whether the corrupted device is the one holding the parity block or one of the devices holding the unpopulated data blocks.
There's some fairly significant missing pieces in the btrfs RAID[56] implementation: scrub neither detects faults in nor corrects parity blocks, and neither do RMW stripe updates (which are sort of a bug in and of themselves), and half a dozen other bugs that pop up in degraded mode.
Bringing bcachefs to the mainline
Bringing bcachefs to the mainline
Bringing bcachefs to the mainline
Wol
Bringing bcachefs to the mainline