All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Alexander Lyakas <alex.bolshoy@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: MD devnode still present after 'remove' udev event, and mdadm reports 'does not appear to be active'
Date: Thu, 20 Oct 2011 10:56:23 +1100	[thread overview]
Message-ID: <20111020105623.7f8038c9@notabene.brown> (raw)
In-Reply-To: <CAGRgLy5rkhfqnYHTt89f8QkigYPHDFdcciP2ZQp1tkcYq2wqNg@mail.gmail.com>

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

On Wed, 19 Oct 2011 14:01:16 +0200 Alexander Lyakas <alex.bolshoy@gmail.com>
wrote:

> Thanks, Neil.
> I experimented with --force switch, and I saw that when using this
> switch it is possible to start the array, even though I am sure that
> the data will be corrupted. Such as selecting stale drives (which have
> been replaced previously etc.)
> Can I have some indication that it is "relatively safe" to start the
> array with --force?
> For example, in the case of "dirty degraded", perhaps it might be
> relatively safe.
> 
> What should I look at? The output of --examine? Or something else?

Yes, look at the output of examine.  Look particularly at update time and
event counts, but also at RAID raid level etc and the role in the array
played by each device.

Then choose the set of devices that you should are most likely to have
current data and given them to "mdadm --assemble --force".

Obviously if one device hasn't been updated for months, that is probably a
bad choice, while if one device is only a few minutes behind the others, then
that is probably a good choice.

Normally there isn't much choice to be made, and the answer will be obvious.
But if you let devices fail and leave them lying around, or don't replace
them, then that can cause problems.

If you need to use --force  there might be some corruption.  Or there might
be none.  And there could be a lot.  But mdadm has know way of knowing.
Usually mdadm will do the best that is possible, but it cannot know how good
that is.

NeilBrown



> 
> Thanks,
>   Alex.
> 
> 
> On Wed, Oct 12, 2011 at 5:45 AM, NeilBrown <neilb@suse.de> wrote:
> > On Tue, 11 Oct 2011 15:11:47 +0200 Alexander Lyakas <alex.bolshoy@gmail.com>
> > wrote:
> >
> >> Hello Neil,
> >> can you please confirm for me something?
> >> In case the array is FAILED (when your enough() function returns 0) -
> >> for example, after simultaneous failure of all drives - then the only
> >> option to try to recover such array is to do:
> >> mdadm --stop
> >> and then attempt
> >> mdadm --assemble
> >>
> >> correct?
> >
> > Yes, though you will probably want a --force as well.
> >
> >>
> >> I did not see any other option to recover such array Incremental
> >> assemble doesn't work in that case, it simply adds back the drives as
> >> spares.
> >
> > In recent version of mdadm it shouldn't add them as spare.  It should say
> > that it cannot add it and give up.
> >
> > NeilBrown
> >
> >
> >


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2011-10-19 23:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29 17:17 MD devnode still present after 'remove' udev event, and mdadm reports 'does not appear to be active' Alexander Lyakas
2011-08-29 21:25 ` NeilBrown
2011-08-30 15:18   ` Alexander Lyakas
2011-08-31  0:54     ` NeilBrown
2011-09-01 21:18       ` Alexander Lyakas
2011-09-13  8:49   ` Alexander Lyakas
2011-09-21  5:03     ` NeilBrown
2011-09-23 19:24       ` Alexander Lyakas
2011-09-25 10:15         ` NeilBrown
2011-10-11 13:11           ` Alexander Lyakas
2011-10-12  3:45             ` NeilBrown
2011-10-19 12:01               ` Alexander Lyakas
2011-10-19 23:56                 ` NeilBrown [this message]
2011-10-23  9:03                   ` Alexander Lyakas
2011-10-23 22:55                     ` NeilBrown

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=20111020105623.7f8038c9@notabene.brown \
    --to=neilb@suse.de \
    --cc=alex.bolshoy@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.