Thread (4 messages) 4 messages, 2 authors, 2013-06-11

Re: Fwd: mismatches in raid1, clarification please

From: Robin Hill <hidden>
Date: 2013-06-11 15:17:24

On Tue Jun 11, 2013 at 02:49:03PM +0100, Andrew Brooks wrote:
Hello

The md manual says that
 "If all blocks read successfully but are found to not be consistent, then
this is regarded as a mismatch."
whereas blocks that suffer from a read error are not counted as mismatches.

It then describes the action
 "If repair was used, then a mismatch will be repaired in the same way that
resync repairs arrays. For RAID1, all but one block are overwritten with the
content of that one block."

If there has been no read error then how does it know which block is good?
It doesn't. I'm not sure what the algorithm is to pick which disk to use
as the reference value, but one disk is picked and that data is then
written to the other mirrors (no matter how many mirrors you have and
how many had each differing value). It's not ideal but it does keep the
code very simple and it returns the array to a consistent state. Without
filesystem level information, there's no way to comprehensively tell
what the correct data is (or whether it matters - in many cases the
"data" has already been deleted anyway).

Cheers,
    Robin
-- 
     ___        
    ( ' }     |       Robin Hill        [off-list ref] |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help