linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Martin Wilck <mwilck@arcor.de>
Cc: Francis Moreau <francis.moro@gmail.com>,
	linux-raid <linux-raid@vger.kernel.org>
Subject: Re: mdadm 3.3 fails to kick out non fresh disk
Date: Mon, 21 Oct 2013 10:59:45 +1100	[thread overview]
Message-ID: <20131021105945.780d5800@notabene.brown> (raw)
In-Reply-To: <5262E9C5.1050200@arcor.de>

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

On Sat, 19 Oct 2013 22:21:25 +0200 Martin Wilck <mwilck@arcor.de> wrote:

> Hi Neil,
> 
> >> Martin started addressing this in another new thread whose subject is
> >> "RFC: incremental container assembly when sequence numbers don't
> >> match"
> >>
> >>
> > Ah yes, thanks.  I had a quick look and it seems to make sense, but it
> > deserves more thorough consideration.
> > I'll get on to that sometime soon.
> 
> 
> Good that you're back. I was starting to get nervous :-)

(still hoping someone else will put their hand up to maintain md though....)

> 
> Wrt the sequence number issue: One thing that I need to understand
> better is how native MD deals with this kind of thing. Containers have
> one additional complexity: one set of meta data for several subarrays.

With native MD is it is fairly simple - that 'one additional complexity' does
make a real difference.

 - Before the array is running, you can add any device.
 - When the array is started, anything older than the newest device is
   discarded (with the understanding that a bitmap broadens the "age"
   of the newest device, so that oldish devices can still be included).
 - If the array is started but readonly, the missing devices of the same age
   as the newest device can be added (I think).
 - After the array is read-write, devices can only be added if there is a
   bitmap, and they must be in the age range of the bitmap.


> 
> IMO one thing I think we need is cleaner semantics for compare_super().
> The return to distinguish at least the cases
> 
>   0 - OK
>   1 - fatal incompatibility
>   2 - nonfatal, new disk has "older" meta data
>   3 - nonfatal, new disk has "newer" meta data

Does this really belong in compare_super()?

Currently compare super is for checking if the device belongs to the array at
all.  The test on the sequence number (event counter) is separate.
getinfo_super should return that in info->events.  Current only super0 and
super1 do that, intel and ddf don't.

> 
> IMSM already has this to some extent.
> 
> The logic to handle this must be in the generic, non-metadata-specific
> code. Metadata handlers need methods to force re-reading the meta data
> from certain disk(s). mdmon also needs a way to detect that it needs to
> reread the meta data.

If there is a container with one array started and the other not, then you
might want to reread the metadata for one array but not the other.
That could get messing but should be do-able.

> 
> Furthermore,  at least compare_super_ddf does not only compare, it also
> makes changes to its internal data structures; I think other meta data
> handlers do the same. IMO it would be more appropriate to do this in a
> separate call, after the caller has decided if and how to merge the meta
> data.

Sounds reasonable.

> 
> Then we need to make sure that (to the maximum extent possible) these
> issued are handled similarly during Assembly and Incremental Assembly.
> 
> The "nonfatal" case is similar to the current "homehost" logic.
> 
> As for the complex scenarios in my "RFC" mail, thinking more about it, I
> found that the dangerous incremental assembly cases are not so critical
> after all, as long as subarrays aren't started prematurely, which is
> mostly guaranteed by the current udev rules.

Agreed.  We should  do our best to detect the dangerous cases, but they
shouldn't be likely.

NeilBrown


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

  reply	other threads:[~2013-10-20 23:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13 13:22 mdadm 3.3 fails to kick out non fresh disk Francis Moreau
2013-09-13 20:43 ` NeilBrown
2013-09-13 22:35   ` Francis Moreau
2013-09-13 23:56     ` Roberto Spadim
2013-09-14 10:38     ` NeilBrown
2013-09-14 14:33       ` Francis Moreau
2013-09-14 15:06         ` Francis Moreau
2013-09-14 20:43           ` Martin Wilck
2013-09-16 13:56             ` Francis Moreau
2013-09-16 17:04               ` Martin Wilck
2013-09-20  8:56                 ` Francis Moreau
2013-09-20 18:07                   ` Martin Wilck
2013-09-20 21:08                     ` Francis Moreau
2013-09-21 13:22                       ` Francis Moreau
2013-09-23 20:02                         ` Martin Wilck
2013-09-27  8:26                           ` Francis Moreau
2013-09-27 15:47                             ` Francis Moreau
2013-10-02 18:33                               ` Martin Wilck
2013-10-16  4:57                                 ` NeilBrown
2013-10-16 20:10                                   ` Francis Moreau
2013-10-17 10:58                                     ` NeilBrown
2013-10-19 20:21                                       ` Martin Wilck
2013-10-20 23:59                                         ` NeilBrown [this message]
2013-09-24 17:38                         ` Martin Wilck
2013-09-24 17:43                           ` Martin Wilck

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=20131021105945.780d5800@notabene.brown \
    --to=neilb@suse.de \
    --cc=francis.moro@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=mwilck@arcor.de \
    /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).