
Hi, On 14/02/2012, at 11:44 AM, Toby Corkindale wrote:
Can you explain the failure modes for when a block checksum fails when you have data on a single disk?
You would get a checksum failure reading that block.
Essentially I was wondering whether you'd lose an entire file (or extent of a file) if the checksum fails, or whether you could still access the rest of the file but with just one block missing in the event of a bad sector.
You wouldn't lose the entire file. btrfs is copy-on-write, so best case scenario, you could walk backwards through the tree to find a previous copy of the same block and read that, assuming the faulty block hasn't changed. If you manage to break the latest copy and the previous block is different, you may have to step back to previous data for that block. The "recover" tool in btrfs-progs is useful for extracting information in a read-only fashion from btrfs volumes. Cheers, Avi