Re: Need help increasing raid scan efficiency.

From: anthony
Date: Tue Jun 03 2025 - 16:27:53 EST


On 03/06/2025 21:04, David Niklas wrote:
Searching online turned up raid6check.
https://unix.stackexchange.com/questions/137384/raid6-scrubbing- mismatch-repair

But the people there also pointed out that Linux's raid repair operation
only recalculates the parity. I would have thought that it did a best of
3 option. I mean, that's a big part of why we have RAID6 instead of RAID5,
right?

From what I remember of raid6check, it actually does a proper raid 6 calculation to recover the damaged data.

Raid 5 certainly just recalculates the parity, but it doesn't have any choice. Because it can only reconstruct ONE piece of information, it can detect the corruption, but it has no idea WHAT is corrupted. So it assumes (with good reason) that it's the parity and re-calculates it. Where raid 5 scores is if you lose a block, or a drive, or whatever, it is told what has been lost and can recreate it. If your data is corrupted, however, it has two pieces of missing information ("what" and "where"), and can only reconstruct one, so it assumes it's the parity that's been lost.

Because raid-6 has two levels of redundancy, if ONE block is damaged, it can work out both what and where, which is what raid6check does.

I've done it slightly differently, I've got raid-5 sat on top of dm-integrity, so if a disk gets corrupted dm-integrity will simply return a read failure, and the raid doesn't have to work out what's been corrupted. I've got a different problem at the moment - my array has assembled itself as three spares, so I've got to fix that ... :-(

Cheers,
Wol