Re: raid1 issue after disk failure: both disks of the array are still active

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

 



On Fri Sep 14, 2012 at 12:04:56 -0600, Chris Murphy wrote:

> 
> On Sep 14, 2012, at 1:45 AM, Niccolò Belli wrote:
> 
> > I also would like to know if the raid1 will *surely* use data from
> > the other disk to write on the broken sector after a CHECK.
> 
> Not according to documentation. In normal operation, and for a repair,
> what you describe is correct. But not for check.
> 
Maybe you need to reread the documentation. The md manual page says:

    Requesting a scrub will cause md to read every block on every device
    in the array, and check that the data is consistent. For RAID1 and
    RAID10, this means checking that the copies are identical. For
    RAID4, RAID5, RAID6 this means checking that the parity block is (or
    blocks are) correct.

    If a read error is detected during this process, the normal
    read-error handling causes correct data to be found from other
    devices and to be written back to the faulty device. In many case
    this will effectively fix the bad block.

So a check will repair cases where the data cannot be read at all, but
will not repair cases where the data is returned but does not match the
data on the other mirror(s).

> > I read that when raid1 is in doubt there is a 50%-50% chance it uses
> > data from the good disk, wouldn't be better to fail the broken disk
> > and then re-add it to the array?
> 
> I don't know what this means.
> 
I assume he's referring to cases where the data is read successfully but
does not match the data on the mirror(s). In this case a repair will
cause one copy to overwrite the others, which may or may not be the
correct copy (md has no way of knowing for a mirrored pair).

Cheers,
    Robin
-- 
     ___        
    ( ' }     |       Robin Hill        <robin@xxxxxxxxxxxxxxx> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

Attachment: pgpGxIAvdGCw6.pgp
Description: PGP 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