Re: Reassembling RAID1 after good drive was offline [newbie]

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

 



On Sun, 04 Jan 2015 21:45:22 +0000 Wols Lists <antlists@xxxxxxxxxxxxxxx>
wrote:

> On 04/01/15 21:07, Aryeh Leib Taurog wrote:
> > On Sun, 4 Jan 2015 at 11:10 Peter Grandi wrote:
> >> Yet another of an endless (but not too frequent fortunately)
> >> stream of "wildly optimistic" messages to this mailing list...
> > 
> > No intent to offend.  I specifically put "newbie" in the subject.
> > 
> >>> Would the resync just copy all the data from the "good" drive
> >>> back to the "failed" drive?
> >>
> >> This seems to me quite "imaginative" based on the dream that
> >> resync has psychic powers.
> > 
> > I am not sure what you mean.  Two drives in a RAID1 array.  At one 
> > point, one drive failed to come on line.  Now mdadm refuses to include 
> > that drive in the array.  So there's the "good" drive, which appears 
> > in the now degraded array, and the "failed" drive, which does not.  I 
> > have never done a resync, and I haven't seen a detailed description of 
> > what it does, but given that mdadm seems to have decided which drive 
> > is good and which not, and assuming mdadm doesn't know anything about 
> > the contents of the data, what is so "imaginative" about the notion 
> > that if I add the "failed" drive to the array, it would simply copy 
> > all the data on the "good" drive byte-by-byte onto the "failed" drive, 
> > overwriting whatever is currently on the "failed" drive?  I can't 
> > imagine how else a resync would work.  What am I missing?
> 
> That mirroring isn't fault-tolerant-raid? I know it's been given a raid
> classification, but raids 1 and 0 really just give you a bigger faster
> disk. It's only the other raids that have any error correction ability,
> because they use parity etc to be able to tell which set of data is correct.

Bzzt.  You lose :-)

Of course RAID1 is fault tolerant!! (I agree that RAID0 isn't).

It cannot tolerate every conceivable fault (e.g. asteroid impact), but it
tolerates most single hardware faults.

The fault is detected by the drive, possibly using a CRC, or by the
controller (hmm.. the drive isn't responding, must be faulty!) and this fault
is communicated to md.  md then manages the fault by accesses the other
device.

*No* RAID level has error detection ability - *all* RAID levels (except zero)
have error correction - providing something else detects the error.
Parity vs mirroring makes no difference here.

(All non-zero RAID levels could try to detect faults by reading all blocks
in a stripe and comparing, but there is no threat-model which makes this a
worthwhile practice)


And to answer the original question: just let it resync.  Had you started
that when you asked the question it would be done by now :-).

To avoid similar problems in future:
 - use a newer mdadm (sorry, but there are bugs sometimes)
 - add an internal write-intent bitmap.  That makes the resync much faster
   when needed
 - Possibly as '--no-degraded' when assembling arrays.

NeilBrown

Attachment: pgpuVPz0FKJw5.pgp
Description: OpenPGP 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