From: Andrey Borzenkov <arvidjaar@mail.ru>
To: linux-hotplug@vger.kernel.org
Subject: Re: udev and md/dm
Date: Sat, 16 Jun 2007 07:49:06 +0000 [thread overview]
Message-ID: <200706161149.08311.arvidjaar@mail.ru> (raw)
In-Reply-To: <20070616002057.GI20024@tasint.org>
[-- Attachment #1.1: Type: text/plain, Size: 2345 bytes --]
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 <Joel.Becker@oracle.com> 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.
at least device mapper already has entries under /dev/mapper; I has been using
it for multipathing only so far, and multipath can be configured to create
persistent names there. I presume other device mapper modules can be told to
create persistent names too.
For mdadm you can specify persistent names based on UUID or array name as
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.
It depends what in imply by "implementing". It is definitely possible to write
such script; moreover, it is quite possible that blkid already does what you
need:
{pts/0}% sudo blkid -l -t UUID="72973377-c299-4ca6-ae94-2022b7dca58f"
/dev/sda2: UUID="72973377-c299-4ca6-ae94-2022b7dca58f" LABEL="/"
TYPE="reiserfs"
-andrey
> 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. But the udev rules skip
> checking uuids and labels on the aggregate devices.
> Please, show me where I'm wrong :-)
>
>
> Joel
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 286 bytes --]
-------------------------------------------------------------------------
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/
[-- 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
next prev parent reply other threads:[~2007-06-16 7:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-16 0:20 udev and md/dm Joel Becker
2007-06-16 2:32 ` Kay Sievers
2007-06-16 7:31 ` Joel Becker
2007-06-16 7:49 ` Andrey Borzenkov [this message]
2007-06-16 8:46 ` Alexander E. Patrakov
2007-06-16 10:40 ` Kay Sievers
2007-06-16 10:53 ` martin f krafft
2007-06-16 11:02 ` Kay Sievers
2007-06-16 16:50 ` Dan Nicholson
2007-06-16 17:09 ` Kay Sievers
2007-06-16 18:38 ` Joel Becker
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=200706161149.08311.arvidjaar@mail.ru \
--to=arvidjaar@mail.ru \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.