From: martin f krafft Date: Mon, 14 Aug 2006 22:27:17 +0000 Subject: Re: feedback sought on mdadm (Debian) sarge->etch upgrade strategy Message-Id: <20060814222717.GB25587@lapse.madduck.net> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1491341208==" List-Id: References: <20060814215311.GA25811@lapse.madduck.net> In-Reply-To: <20060814215311.GA25811@lapse.madduck.net> To: linux-hotplug@vger.kernel.org --===============1491341208== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="s/l3CgOIzMHHjg/5" Content-Disposition: inline --s/l3CgOIzMHHjg/5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable also sprach martin f krafft [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=3Dmdadm;a=3Dblob;hb=3DHEAD;f=3Dsuper0.c#l228 http://neil.brown.name/git?p=3Dmdadm;a=3Dblob;hb=3DHEAD;f=3Dsuper1.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/ if /dev/md does not exist, and /dev/md 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! --=20 .''`. martin f. krafft : :' : proud Debian developer and author: http://debiansystem.info `. `'` `- Debian - when you have better things to do than fixing a system =20 "arguments are extremely vulgar, for everyone in good society holds exactly the same opinion." -- oscar wilde --s/l3CgOIzMHHjg/5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature (GPG/PGP) Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFE4PjFIgvIgzMMSnURAlSUAJ44iWPmJSdyJasxLYdmeMugI4sncACfTlm8 AoKvcU0l8j/f2CK2OAqo10Q= =IyiJ -----END PGP SIGNATURE----- --s/l3CgOIzMHHjg/5-- --===============1491341208== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- 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 --===============1491341208== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1491341208==--