All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford@redhat.com>
To: "Labun, Marcin" <Marcin.Labun@intel.com>
Cc: Neil Brown <neilb@suse.de>,
	Linux RAID Mailing List <linux-raid@vger.kernel.org>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	"Ciechanowski, Ed" <ed.ciechanowski@intel.com>,
	"Hawrylewicz Czarnowski,
	Przemyslaw" <przemyslaw.hawrylewicz.czarnowski@intel.com>
Subject: Re: More Hot Unplug/Plug work
Date: Wed, 28 Apr 2010 17:05:58 -0400	[thread overview]
Message-ID: <4BD8A336.7080309@redhat.com> (raw)
In-Reply-To: <905EDD02F158D948B186911EB64DB3D11C95485F@irsmsx503.ger.corp.intel.com>

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

On 04/28/2010 02:34 PM, Labun, Marcin wrote:
>>> Going further, thus causes that a new disk can be potentially grabbed
>> by more than one container (because of shared path).
>>> For example:
>>> DOMAIN1: path=a path=b path=c
>>> DOMAIN2: path=a path=d
>>> DOMAIN3: path=d path=c
>>> In this example disks from path c can appear in DOMAIN 1 and DOMAIN
>> 3, but not in DOMAIN 2.
>>
>> What exactly is the use case for overlapping paths in different
>> domains?
> 
> OK, makes sense.
> But if they are overlapped, will the config functions assign path are requested by configuration file
> or treat it as misconfiguration?

For now it merely means that the first match found is the only one that
will ever get used.  I'm not entirely sure how feasible it is to detect
matching paths unless we are just talking about identical strings in the
path= statement.  But since the path= statement is passed to fnmatch(),
which treats it as a file glob, it would be possible to construct two
path statements that don't match but match the same set of files.  I
don't think we can reasonably detect this situation, so it may be that
the answer is "the first match found is used" and have that be the
official stance.

> So, do you plan to make changes similar to incremental in assembly to serve DOMAIN?

I had not planned on it, no.  The reason being that assembly isn't used
for hotplug.  I guess I could see a use case for this though in that if
you called mdadm -As then maybe we should consult the DOMAIN entries to
see if there are free drives inside of a DOMAIN listed as spare or grow
and whether or not we have any degraded arrays while assembling that
could use the drives.  Dunno if we want to do that though.  However, I
think I would prefer to get the incremental side of things working
first, then go there.

> Should an array be split (not assembled) if a domain paths are dividing array into two separate DOMAIN?

I don't think so.  Amongst other things, this would make it possible to
render a machine unbootable if you had a type in a domain path.  I think
I would prefer to allow established arrays to assemble regardless of
domain path entries.

>>  I'm happy to rework the code to support it if there's a valid use
>> case, but so far my design goal has been to have a path only appear in
>> one domain, and to then perform the appropriate action based upon that
>> domain.
> What is then the purpose of metadata keyword?

Mainly as a hint that a given domain uses a specific type of metadata.

> My initial plan was to create a default configuration for a specific metadata, where user specifies actions 
> but without paths letting metadata handler to use default ones.
> In your description, I can see that the path are required.

Yes.  We already have a default action for all paths: incremental.  This
is the same as how things work today without any new support.  And when
you combine incremental with the AUTO keyword in mdadm.conf, you can
control which devices are auto assembled on a metadata by metadata basis
without the use of DOMAINs.  The only purpose of a domain then is to
specify an action other than incremental for devices plugged into a
given domain.

>> add it to.  Only if there are no degraded arrays would we add it as a
>> spare to one of the arrays (non-deterministic which one).  If we add it
>> as a spare to one of the arrays, then monitor mode can move that spare
>> around as needed later based upon the spare-group settings.  Currently,
>> there is no correlation between spare-group and DOMAIN entries, but
>> that might change.
> 
> A spare should go to any container controlled by mdmon, so any that contains redundant volumes.

Yep.

>>
>>> So, in case of Monitor, sharing a spare device will be per path
>> basis.
>>
>> Currently, monitor mode still uses spare-group for controlling what
>> arrays can share spares.  It does not yet check any DOMAIN information.
> 
> Yes, and I am now adding support for domains in monitor and for spare-groups for external metadata.

Good to hear.

>>
>>> The same for new disks in hot-plug feature.
>>>
>>>
>>> In your repo domain_ent is a struct that contains domain paths.
>>> The function arrays_in_domain returns a list of mdstat entries that
>> are in the same domain as the constituent device name.
>>> (so it requires devname and domain as input parameter).
>>> In which case two containers will share the same DOMAIN?
>>
>> You get the list of containers, not just one.  See above about
>> searching the list for a degraded container and adding to it before a
>> healthy container.
> OK.


-- 
Doug Ledford <dledford@redhat.com>
              GPG KeyID: CFBFF194
	      http://people.redhat.com/dledford

Infiniband specific RPMs available at
	      http://people.redhat.com/dledford/Infiniband


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2010-04-28 21:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-27 16:45 More Hot Unplug/Plug work Doug Ledford
2010-04-27 19:41 ` Christian Gatzemeier
2010-04-28 16:08 ` Labun, Marcin
2010-04-28 17:47   ` Doug Ledford
2010-04-28 18:34     ` Labun, Marcin
2010-04-28 21:05       ` Doug Ledford [this message]
2010-04-28 21:13         ` Dan Williams
2010-04-30 13:38           ` Doug Ledford
2010-04-29  1:01         ` Neil Brown
2010-04-29  1:19           ` Dan Williams
2010-04-29  2:37             ` Neil Brown
2010-04-29 18:22               ` Labun, Marcin
2010-04-29 21:55               ` Dan Williams
2010-05-03  5:58                 ` Neil Brown
2010-05-08  1:06                   ` Dan Williams
2010-04-30 16:13               ` Doug Ledford
2010-04-30 11:14             ` John Robinson
2010-04-30 15:52           ` Doug Ledford
2010-04-28 20:59     ` Luca Berra
2010-04-28 21:16       ` Doug Ledford
2010-04-29 20:32 ` Dan Williams
2010-04-29 21:22 ` Dan Williams
2010-04-30 16:26   ` Doug Ledford

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=4BD8A336.7080309@redhat.com \
    --to=dledford@redhat.com \
    --cc=Marcin.Labun@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=ed.ciechanowski@intel.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=przemyslaw.hawrylewicz.czarnowski@intel.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 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.