[CentOS] Re: question about software Raid 1

Kay Diederichs kay.diederichs at uni-konstanz.de
Sun Sep 21 19:01:15 UTC 2008


Nataraj wrote:
> Does software raid 1 compare checksums or otherwise verify that the same
> bits are coming from both disks during reads?  What I'm interested in,
> is whether bit errors that were somehow undetected by the hardware would
> be detected by the raid 1 software.
> 
> Thanks,
> Nataraj

I've been thinking about this as well.

Fact is that with CentOS-5 kernels (but not with CentOS-4, as this 
functionality became available in kernel 2.6.17) you could (or rather 
_should_ regularly)
    echo check > /sys/block/mdX/md/sync_action
to check agreement between the two (or more) copies. When this finishes, 
/sys/block/mdX/md/mismatch_cnt shows you the number of mismatches. You 
can fix these with
    echo repair > /sys/block/mdX/md/sync_action

This applies to at least RAID1 and RAID5.
At this point the question arises: how does the "repair job" know which 
copy is the correct one? I have no answer to this question.

BTW, there is - even with current kernels - no speed gain in using RAID1 
- see http://kernelnewbies.org/KernelProjects/Raid1ReadBalancing .

HTH a bit,

Kay




More information about the CentOS mailing list