Re: Fwd: mismatches in raid1, clarification please

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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        <robin@xxxxxxxxxxxxxxx> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux