mdadm RAID1 vs btrfs RAID1 because:
- With btrfs, all read requests from the same PID go to the same device
bcachecoverage is doubled using a single
mdadmRAID1 device vs btrfs with 2 devices
My question relates to bitrot which is undetected by hardware ECC.
If I get detect mismatching data (a non-
echo check > /sys/block/md0/md/sync_action
Given a non-
mismatch_cnt, how do I determine:
- The affected blocks
- The affected files
I expect to need to read the files a few times (how to disable caching?) until I luck the good mirror's copy of the data. I'd measure this by the filesystem not throwing a CRC error, or the data passing its own internal checks (eg zip CRC).
- Can I then re-write the RAID1 blocks, while keeping the file metadata (eg file creation timestamp) intact?
[If I used something like
clone mode to try to repair the bad RAID blocks from the copied (CRC-good) data, a failure case in the clone process is when the correct RAID1 block is returned by
mdadm, and the extents of the CRC-good copy are replaced by those of the original good RAID copy, leaving the bad RAID blocks unchanged.]