Re: 3 way mirror

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

 



On 11/09/2022 10:08, Gandalf Corvotempesta wrote:
> let's assume a 3 way mirror (raid1 with 3 disks)
> One disk got a bad sector detrcted by smartd
> what happens trying to read or write to that sector?
>
> is md smart enough to read from the other 2 disks and serve consistant data?
>
> in other words, can i delay the disk replacement for a couple of days
> (i've ordered the disk today, will came tuesday) ?

If this is a recorded grown defect or block reallocation, the drive will
continue to operate normally anyway; the disk will have remapped the
sector internally to one of a few thousand spares kept for the purpose.

However for failed sectors in general, and especially ones that have not
been remapped, yes if MD tries to read from the block and the disk
reports a read error it will automatically redirect to another drive.  I
believe it will also attempt to rewrite the bad sector with the data
from the other drive in order to repair the mirror.  Write operations
will be sent to all three drives and the drive with the bad sector will
normally automatically remap to a spare sector if the internal write
fails.  Once available spare sectors are exhausted the drive will fail
the write, at which point md will fail the drive out of the array.

Of course, this is dependent on your disks returning errors in a timely
fashion rather than locking up on extensive retries.  If you are using
NAS-level or enterprise drives, you should be good, but if you are using
desktop-grade drives they are likely by default to retry for so long
that the kernel times out and the drive drops off the bus instead of
reporting an error.  At that point, of course, md sees the drive as failed.

Cheers,

Geoff.

Geoff Back
What if we're all just characters in someone's nightmares?





[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