From: Dan Williams <dan.j.williams@intel.com>
To: Neil Brown <neilb@suse.de>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: [mdadm git pull] "--assemble --scan" support for imsm
Date: Sun, 02 Nov 2008 16:15:52 -0700 [thread overview]
Message-ID: <1225667752.14396.22.camel@dwillia2-linux.ch.intel.com> (raw)
In-Reply-To: <18697.11562.810718.957829@notabene.brown>
On Wed, 2008-10-29 at 20:42 -0700, Neil Brown wrote:
> To fit the assembly of a specific member of a container into this
> model, we need to have the 'container' in the list of available
> devices.
> If the identity specifies 'container=whatever' then we clearly select
> all devices which match that. You would expect at exactly one - the
> container. You would then need to call ->container_content on that
> container and find the correct member array which matches the
> 'member=' specifier (or any other specifier there might be?)
>
> Exactly how updates and "--force" are passed though would need to be
> sorted out.
> Then the devices in the selected array from ->container_content could
> be passed to sysfs_add_disk and the array started.
>
> Auto-assembly would discover that the first unused-so-far device was a
> container, and would need to load the list of arrays and assemble the
> first one that was not yet assembled.
>
I had a go at this, and the result is pushed out to my scratch-devel
branch. mdadm can now:
1/ Scan and assemble container members
mdadm -Es > mdadm.conf
cat mdadm.conf
ARRAY metadata=imsm auto=md UUID=88f0b659-966978a7-842f86c0-879a414d
ARRAY /dev/md/r1 container=88f0b659-966978a7-842f86c0-879a414d
member=0 auto=mdp UUID=42d6de62-bd27b267-96e8e960-13efc3a6
ARRAY /dev/md/r2 container=88f0b659-966978a7-842f86c0-879a414d
member=1 auto=mdp UUID=b0764c97-8b4fdf0e-0821862e-a80f1452
mdadm -Asc mdadm.conf
mdadm: Container /dev/md/imsm127 has been assembled with 6 drives
mdadm: Started /dev/md/r1 with 6 devices
mdadm: Started /dev/md/r2 with 6 devices
2/ Assemble member array by uuid
mdadm -A /dev/md/r1 /dev/md/imsm -a mdp -u 42d6de62-bd27b267-96e8e960-13efc3a6
3/ Auto-assemble member arrays as foreign arrays
This still does not handle updates or --force... it seems awkward to try
and support --force at anything other than the container level, but that
is the extent of my thinking so far.
The following changes since commit fb9253084ab0b9e4ac1113e4fc8f0b88d818d4f8:
NeilBrown (1):
mdopen: fix up name parsing.
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/djbw/mdadm.git scratch-devel
Dan Williams (21):
Quiet uninitialized variable warnings
Makefile: fixup install of udev rules
imsm: match_home(), document why it is stubbed out
Let symlinks to standard devices count as standard names
imsm: display member array uuid in examine_super_imsm
imsm: display container uuid in detail_super
config: add 'containers' as a DEVICE keyword
Add a 'container' flag to mddev_dev_t
Assemble: check if the devlist entry is a container
Assemble: let trustworthy be LOCAL when array is identified
Assemble: replace 'info' with 'content'
Assemble: teach it to look inside containers for matching arrays
Assemble: discard non-container devices when not required
cleanup an unused call to container2devname
config: add containers to the default search list
Assemble: revert preliminary -As support
Copy container_dev in dup_super
Assemble: factor out and call assemble_container_content
fixup create_mddev
Assemble: block attempts to reassemble container members
Assemble: enable member array auto-assembly
Assemble.c | 428 ++++++++++++++++++++++++++++++++++++++-------------------
Incremental.c | 99 +------------
Makefile | 4 +-
config.c | 46 ++++++-
mdadm.c | 1 +
mdadm.h | 17 ++-
mdmon.c | 9 ++
mdopen.c | 7 +-
super-intel.c | 37 ++++--
util.c | 155 ++++++++++++++++++++-
10 files changed, 542 insertions(+), 261 deletions(-)
next prev parent reply other threads:[~2008-11-02 23:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-28 21:44 [mdadm git pull] "--assemble --scan" support for imsm Dan Williams
2008-10-29 9:19 ` Neil Brown
2008-10-29 16:12 ` Dan Williams
2008-10-30 3:42 ` Neil Brown
2008-11-02 23:15 ` Dan Williams [this message]
2008-11-04 10:52 ` Neil Brown
2008-11-05 15:40 ` Dan Williams
2008-10-30 12:43 ` Neil Brown
[not found] <4C69D525.4060404@gmail.com>
2010-08-17 16:49 ` Dan Williams
2010-08-17 18:48 ` Jiang, Dave
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=1225667752.14396.22.camel@dwillia2-linux.ch.intel.com \
--to=dan.j.williams@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.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).