From: Alasdair G Kergon <agk@redhat.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Udev integration for device-mapper and its subsystems.
Date: Wed, 29 Apr 2009 00:28:36 +0000 [thread overview]
Message-ID: <20090429002836.GW23302@agk.fab.redhat.com> (raw)
In-Reply-To: <49F5DC36.9080309@redhat.com>
On Tue, Apr 28, 2009 at 11:25:31PM +0200, Kay Sievers wrote:
> Don't know, the name is probably not the right thing, because it can
> be changed, The uuid might fit better.
But why would changing the name be a problem?
What is fundamental here is the device number - that's all.
E.g. Anything in userspace that opens /dev/something has to check that
what it actually opened still has the same device number, if it cares
about avoiding races.
If we can extend this field in-kernel and put the user's preferred device name
in there we'd gain the immediate big advantage of error messages produced
throughout the kernel using a name that the sysadmin can translate into
something they understand much more easily. "dm-vg1-lvol1" instead of "dm-13".
And this would be a big help to people I believe. (Although the dm name
can be very long, on most systems it's still quite short. The uuid on the
other hand is long and typically randomly-generated and meaningless to the
sysadmin.)
Then any userspace packages would by default pick up a meaningful name -
something considerably more persistent and useful than dm-X.
So my latest proposal would be:
1) Change the kernel to allow longer names for block devices
2) Change dm to insert dm-<name> into this field instead of dm-X
3) Add an in-kernel interface to let dm change this name on request by the user
4) Adjust udev rules to create nodes as /dev/dm-<name>
(actually I'd still argue that /dev/subsystem/name is a better approach)
5) Change all dm-based userspace tools to handle /dev/dm-*
6) Change anything if there is anything in userspace that cares about those
/dev names getting changed on a live object and needs to react differently to a
CHANGE uevent.
And eventually perhaps:
7) Phase out /dev/mapper (in a suitably-compatible way as usual so we don't
break anything)
8) Consider whether people are ready to stomach the phasing out of /dev/vg/lv
or whether that should move to /dev/lvm/vg/lv so it doesn't pollute the
flat /dev namespace. (LVM2 has always worked with just vg/lv and simply
treats '/dev/' as an optional prefix, not a path.)
9) Also consider whether there's a better prefix than dm- to use on these
devices. It's too easily confused with md. map- perhaps. Other ideas?
Alasdair
--
agk@redhat.com
next prev parent reply other threads:[~2009-04-29 0:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-27 16:24 Udev integration for device-mapper and its subsystems Peter Rajnoha
2009-04-28 17:41 ` Kay Sievers
2009-04-28 18:45 ` Alasdair G Kergon
2009-04-28 19:24 ` Kay Sievers
2009-04-28 21:16 ` Milan Broz
2009-04-28 21:25 ` Kay Sievers
2009-04-29 0:28 ` Alasdair G Kergon [this message]
2009-04-29 1:16 ` Kay Sievers
2009-04-29 2:45 ` Alasdair G Kergon
2009-04-29 10:05 ` Kay Sievers
2009-04-29 11:52 ` Milan Broz
2009-04-29 12:41 ` Karel Zak
2009-04-29 12:55 ` Kay Sievers
2009-04-29 12:59 ` Hannes Reinecke
2009-04-29 13:45 ` Kay Sievers
2009-04-29 20:11 ` Peter Rajnoha
2009-04-29 20:46 ` Kay Sievers
2009-04-29 21:44 ` Peter Rajnoha
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=20090429002836.GW23302@agk.fab.redhat.com \
--to=agk@redhat.com \
--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).