linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: martin f krafft <madduck@debian.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: feedback sought on mdadm (Debian) sarge->etch upgrade strategy
Date: Mon, 14 Aug 2006 22:27:17 +0000	[thread overview]
Message-ID: <20060814222717.GB25587@lapse.madduck.net> (raw)
In-Reply-To: <20060814215311.GA25811@lapse.madduck.net>


[-- Attachment #1.1: Type: text/plain, Size: 2458 bytes --]

also sprach martin f krafft <madduck@madduck.net> [2006.08.14.2253 +0100]:
>    If, however, mdadm creates a /dev/md/X node, udev will then
>    create /dev/mdX, and this confuses the hell out of mdadm later,

To make a long story short, mdadm now knows two superblock versions:
0 and 1. Basically, the source of the problem is that these two use
different algorithms to determine the device name to use. See:

  http://neil.brown.name/git?p=mdadm;a=blob;hb=HEAD;f=super0.c#l228
  http://neil.brown.name/git?p=mdadm;a=blob;hb=HEAD;f=super1.c#l321

The brief_examine_super[01] functions determine the name. While
version-1 superblocks hard-code the name to be used, version-0
superblocks determine it from the super-minor field. They will use
/dev/md/<super-minor> if /dev/md<super-minor> does not exist, and
/dev/md<super-minor> if the device node is already present.

I am not so worried about version-1 right now (even though I don't
like the hardcoding aspect), since all Debian sarge systems have
version-0 superblocks (version-1 was introduced with mdadm 2.5,
sarge has version 1.9). Thus, the systems may use /dev/mdX or
/dev/md/X, and those could be referenced in LVM metadata,
/etc/crypttab, or /etc/fstab (and probably others). Thus, I should
make sure that the array is started and the expected device node
present by the time they are used (by LVM/dm-crypt/whatever).

The "solution" right now is that mdadm creates a /dev/mdX ->
/dev/md/X symlink if the device is assembled as /dev/md/X, and
/dev/mdX otherwise.

Obviously, this is bad because mdadm must thus know about block
device major/minor numbers, which it should not have to. The right
way would IMHO be if mdadm just told the kernel to create a device
e.g. /dev/md6 and assemble the array according to information passed
to it. A preliminary such interface exists, but only *after* the md
devices have been created, otherwise /sys/block/mdX does not exist.

So it's all a big catch-22 and I am not sure how to best handle it.
Thus, I'd be happy to hear your input!

-- 
 .''`.     martin f. krafft <madduck@debian.org>
: :'  :    proud Debian developer and author: http://debiansystem.info
`. `'`
  `-  Debian - when you have better things to do than fixing a system
 
"arguments are extremely vulgar,
 for everyone in good society
 holds exactly the same opinion."
                                                        -- oscar wilde

[-- Attachment #1.2: Digital signature (GPG/PGP) --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 373 bytes --]

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

[-- Attachment #3: Type: text/plain, Size: 226 bytes --]

_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

      reply	other threads:[~2006-08-14 22:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-14 21:53 feedback sought on mdadm (Debian) sarge->etch upgrade strategy martin f krafft
2006-08-14 22:27 ` martin f krafft [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=20060814222717.GB25587@lapse.madduck.net \
    --to=madduck@debian.org \
    --cc=linux-hotplug@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).