From: Neil Brown <neilb@suse.de>
To: "Keld Jørn Simonsen" <keld@dkuug.dk>
Cc: linux-raid@vger.kernel.org
Subject: Re: auto-assembling arrays without a configuration file
Date: Fri, 14 Mar 2008 16:27:55 +1100 [thread overview]
Message-ID: <18394.3291.753581.887869@notabene.brown> (raw)
In-Reply-To: 20080310134828.GF9348@rap.rap.dk
On Monday March 10, keld@dkuug.dk wrote:
> On Mon, Mar 10, 2008 at 10:01:50AM +1100, Neil Brown wrote:
> > On Saturday March 8, keld@dkuug.dk wrote:
> > > I want to assemble the root partition automatically, without having
> > > a configuration file. Is that possible?
> > >
> > > mdadm -A --scan
> > >
> > > does seem to require a configuration file.
> > >
> > > On the other hand, I think all info needed is available in the super
> > > blocks, and a traversal of the partitions present on the system (ala
> > > fdisk -l) could give consistent naming - there seems to be no /dev/md
> > > association available in the superblock.
> >
> > The information that is not present in the super blocks is which
> > array you want to assemble.
>
> Yse, that is evident.
>
> > This becomes particularly important if you move some drives from one
> > machine to another.
>
> Moving a disk from one machine to another is not the common thing with
> raids. This is only done in special cases, and not prat of ordinary
> operations.
I absolutely agree. However the time when you do it you are quite
possibly trying to get something that was broken working again. And
so you don't want any surprises.
So I encourage configurations where moving devices around will not
cause unpleasant surprises. Tagging all arrays with the host name
helps remove these surprises.
>
> > For that reason mdadm knows about a "homehost". You can tag each
> > array with a hint about what host it expects to be assembled on.
> > If you run
> >
> > mdadm -As --homehost=`hostname`
> >
> > then it will auto-assemble any arrays for the current host.
> > If you arrays haven't been tagged for at particular host, then
> >
> > mdadm -As --homehost=`hostname` --auto-update-homehost
> >
> > will automatically tag everything that is found for the current host.
> > This is not something that should be done automatically, but it OK to
> > do one when you know you haven't done anything interesting with
> > devices.
>
> Hmm, I am still looking for a way to boot a linúx raid as root.
Look at README.initramfs in the mdadm release.
It might not answer all your questions, but I describes in general how
it should work, and provides a simple sample you could build on.
NeilBrown
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2008-03-14 5:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-08 0:40 auto-assembling arrays without a configuration file Keld Jørn Simonsen
2008-03-08 10:49 ` Keld Jørn Simonsen
2008-03-09 23:25 ` Neil Brown
[not found] ` <18388.27742.907731.241140@notabene.brown>
2008-03-10 13:48 ` Keld Jørn Simonsen
2008-03-10 15:08 ` Andre Noll
2008-03-14 5:27 ` Neil Brown [this message]
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=18394.3291.753581.887869@notabene.brown \
--to=neilb@suse.de \
--cc=keld@dkuug.dk \
--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 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).