From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Sat, 16 Jun 2007 10:40:08 +0000 Subject: Re: udev and md/dm Message-Id: <1181990408.4138.19.camel@lov.localdomain> List-Id: References: <20070616002057.GI20024@tasint.org> In-Reply-To: <20070616002057.GI20024@tasint.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Sat, 2007-06-16 at 00:31 -0700, 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 naming? > > >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. dm: (requires a simple patch to dmsetup) http://git.kernel.org/?p=linux/hotplug/udev.git;a=blob;f=etc/udev/suse/64-device-mapper.rules;hb=HEAD md: (requires the latest mdadm) http://git.kernel.org/?p=linux/hotplug/udev.git;a=blob;f=etc/udev/suse/64-md-raid.rules;hb=HEAD > 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. So /dev/disk/by-uuid/xxxxx > 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. Right, vol_id recognizes md-metadata and doesn't return uuid/label for raid members. Udev has priorities for the symlink-stack (multiple devices can claim the same name, but only one can actually own the symlink), and the multipath rules for dm-devices specify a higher priority, so that symlinks requested from the individual paths are overwritten. > But the udev rules skip > checking uuids and labels on the aggregate devices. > Please, show me where I'm wrong :-) All of that is not in RHEL or Debian at the moment. :) Kay ------------------------------------------------------------------------- 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/ _______________________________________________ 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