Actually, it says the opposite:
- Code: Select all
echo repair > /sys/block/mdX/md/sync_action
Only valid for parity raids - this will also check the integrity of the data as it reads it, and rewrite a corrupt stripe. It will terminate immediately without doing anything if the array is degraded, as it cannot recalculate the faulty data.
DO NOT run this on raid-6 without making sure that it is the correct thing to do.
With a raid-5 array the only thing that can be done when there is an error is to correct the parity. This is also the most likely error - the scenario where the data has been flushed and the parity not updated is the expected cause of problems like this.
With raid-6, it is possible to detect which block is corrupt - certainly on a single-bit error. However, "repair" will not correct this sort of error. Be very careful using it - it may just rewrite both parities and leave any corruption in place. The reason for this behaviour is that there is no easily detectable cause for data error and the correct repair strategy needs user intervention. There is a utility "raid6check" that you should use if "check" flags data errors on a raid-6.
This was one of the documents that prompted this post. They are telling you, essentially, that it could just as well harm your data as fix your parity. They say "make sure" but how can you be sure? If there is damage to your parity, what choice do you have? The documents for mdadm still say use radi6check. Raid6check is still in the source code for mdadm. If the maintainers at Debian (or Arch or whoever) took it out, I have to believe that there is a better alternative. I just want to know what that alternative is. I cannot find it documented anywhere.