Web lists-archives.com

Re: Experiences with BTRFS -- is it mature enough for enterprise use?




On 12/31/17 14:45, Sven Hartge wrote:
David Christensen <dpchrist@xxxxxxxxxxxxxxxx> wrote:
     $ man 4 md

     SCRUBBING AND MISMATCHES
     ...
        If check was used, then no action is taken to handle the mismatch,  it
        is  simply  recorded.   If  repair  was  used,  then a mismatch will be
        repaired in the same way that resync repairs arrays.   For RAID5/RAID6
        new parity blocks are written.  For RAID1/RAID10, all but one block are
        overwritten with the content of that one block.


I wonder how md picks "that one block"?

Only if one drives reports an error. Then data from the good block is
used to overwrite the bad block, hoping the drive remaps the sector and
everything is fine again.

If both devices report no error but differing data has been read,
MD-RAID1 can't know which block is good.

MD-RAID5/6 could calculate all parity combinations and use the data a
majority agrees upon. (I don't know if it does it, though).

I tried looking at the Kernel RAID code, but I must admit: it is all
Esperanto to me, the code is far too low level for me to understand.

That's why "programming systems product" [1] includes architectural, functional, design, construction, etc., documentation.


FreeBSD is better is this regard [2].


David


[1] https://www.pearson.com/us/higher-education/program/Brooks-Mythical-Man-Month-The-Essays-on-Software-Engineering-Anniversary-Edition-2nd-Edition/PGM172844.html

[2] https://www.pearson.com/us/higher-education/program/Mc-Kusick-Design-and-Implementation-of-the-Free-BSD-Operating-System-The-2nd-Edition/PGM224032.html