From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrey Borzenkov Date: Sat, 16 Jun 2007 07:49:06 +0000 Subject: Re: udev and md/dm Message-Id: <200706161149.08311.arvidjaar@mail.ru> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============0466492930==" List-Id: References: <20070616002057.GI20024@tasint.org> In-Reply-To: <20070616002057.GI20024@tasint.org> To: linux-hotplug@vger.kernel.org --===============0466492930== Content-Type: multipart/signed; boundary="nextPart1871318.Gk0NzPbhNg"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1871318.Gk0NzPbhNg Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 16 June 2007, Joel Becker wrote: > On Sat, Jun 16, 2007 at 04:32:49AM +0200, Kay Sievers wrote: > > On 6/16/07, Joel Becker wrote: > > > Why does udev ignore md* and dm-* devices for persistent namin= g? > > >I was utterly surprised to find that an ext3 on /dev/md0 or /dev/dm-0 > > >won't show up in /dev/disk/by-uuid. Given that dm and md devices can > > >change names, isn't this something we'd really like to have? > > > > Sure, they just have their own rules files. Both have specific > > requirements/lifetime-rules and plug into "change" events. > > I'm looking at rhel5, debian, and raw udev-105, and I can't find > anywhere in the rules that use vol_id to map md or dm devices to > /dev/disk/by-label and /dev/disk/by-uuid. The vol_id using files > (persistent.rules) skips those devices. I can see why perhaps you'd say > "loop and ramdisk may be garbage", but dm*, md*, and similar are > expected persistent environment things. And their names can certainly > change. at least device mapper already has entries under /dev/mapper; I has been us= ing=20 it for multipathing only so far, and multipath can be configured to create= =20 persistent names there. I presume other device mapper modules can be told t= o=20 create persistent names too. =46or mdadm you can specify persistent names based on UUID or array name as= =20 well. I agree that having everything in one place simplifies things. > I ask because I am looking at implementing a robust "how to > determine what device is meant by UUID xxxxx". Robust in the face of > catching the raid1 and multipath and so on.=20 It depends what in imply by "implementing". It is definitely possible to wr= ite=20 such script; moreover, it is quite possible that blkid already does what yo= u=20 need: {pts/0}% sudo blkid -l -t UUID=3D"72973377-c299-4ca6-ae94-2022b7dca58f" /dev/sda2: UUID=3D"72973377-c299-4ca6-ae94-2022b7dca58f" LABEL=3D"/"=20 TYPE=3D"reiserfs" =2Dandrey > So /dev/disk/by-uuid/xxxxx=20 > wouldn't point to /dev/sdd1 if it really should be /dev/md0. I had > hoped udev + vol_id would do this for me, as vol_id seems to have > explicit ordering to make this work right. But the udev rules skip > checking uuids and labels on the aggregate devices. > Please, show me where I'm wrong :-) > > > Joel --nextPart1871318.Gk0NzPbhNg Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBGc5X0R6LMutpd94wRAkLgAJ0ZQbrXUGTMQKUJGQx+zgwFEfnMXQCgiKAu Xl0oIlKkZ9ekli/7w6Whzws= =uT68 -----END PGP SIGNATURE----- --nextPart1871318.Gk0NzPbhNg-- --===============0466492930== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ --===============0466492930== 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 --===============0466492930==--