btrfs-progs
btrfs-progs copied to clipboard
Enhancement: scrub on nodatasum files
An improvement to scrub would be to do a bytewise compare of nodatasum files if DUP, RAID1/10/c34 is used. This can help detect possible corruption if one of the copies mismatch the other.
An enhanced btrfs restore tool could then be used to extract all copies so that the user could compare the files herself.
In the case of RAID1/10c34, scrub could also help identify which copies that are likely the bad/good ones.
RAID56. Perhaps it would be possible to check the data against the parity stripe to detect corruption, even though it can't say if the parity of the data is correct.
That's an interesting idea and after recent scrub code refactoring relatively easy to implement.