linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Wols Lists <antlists@youngman.org.uk>
Cc: Aryeh Leib Taurog <vim@aryehleib.com>, linux-raid@vger.kernel.org
Subject: Re: Reassembling RAID1 after good drive was offline [newbie]
Date: Tue, 6 Jan 2015 07:54:00 +1300	[thread overview]
Message-ID: <20150106075400.4a208293@notabene.brown> (raw)
In-Reply-To: <54A9B472.9090905@youngman.org.uk>

[-- Attachment #1: Type: text/plain, Size: 3031 bytes --]

On Sun, 04 Jan 2015 21:45:22 +0000 Wols Lists <antlists@youngman.org.uk>
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

  parent reply	other threads:[~2015-01-05 18:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-01 17:40 Reassembling RAID1 after good drive was offline [newbie] Aryeh Leib Taurog
2015-01-01 20:54 ` Robert L Mathews
2015-01-02 11:01   ` Anthonys Lists
2015-01-02 14:02     ` Aryeh Leib Taurog
2015-01-02 13:01   ` Aryeh Leib Taurog
2015-01-02 18:38     ` Robert L Mathews
2015-01-04 10:20       ` Aryeh Leib Taurog
2015-01-04 11:10         ` Peter Grandi
2015-01-04 21:07           ` Aryeh Leib Taurog
2015-01-04 21:45             ` Wols Lists
2015-01-05 17:25               ` Robert L Mathews
2015-01-05 18:54               ` NeilBrown [this message]
2015-01-07  8:30                 ` Aryeh Leib Taurog

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150106075400.4a208293@notabene.brown \
    --to=neilb@suse.de \
    --cc=antlists@youngman.org.uk \
    --cc=linux-raid@vger.kernel.org \
    --cc=vim@aryehleib.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).