You can initiate a scrub of a mdadm array with
echo 'check' > /sys/block/mdX/md/sync_action, and if a bad sector is found, it'll rewrite it automatically (from a mirror or from parity information for RAID5/6).
However if all blocks read successfully but are found to not be consistent, then this is regarded as a mismatch. In this case repair is complicated because mdadm cannot tell which mirror contains the correct data (RAID1/10) or whether it is data or parity that is corrupted (RAID5).
In theory this is not the case with RAID6 if I understand RAID6 correctly. Because double-parity exists, it should be possible to pinpoint where a single corruption is, whether it is data or parity.
- Is my understanding correct, should this be possible in theory?
- If correct, is mdadm able to repair this inconsistent data without guessing which block is corrupted?