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@xxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html