Re: libdevmapper's handling of devices with spaces in the name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dne 26.2.2014 18:04, Phillip Susi napsal(a):
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

So if I tell dmsetup to create a device named 'foo bar' it ends up
actually naming it 'foo\x20bar'.  If I run parted on 'foo\x20bar', it
appears that libdevmapper helpfully tries to unescape the name,
returning 'foo bar' from dm_task_get_name().  Unfortunately, such a
dev node does not actually exist so this creates a problem trying to
open it.

This seems like a bug in libdevmapper.  I'd say the name of the actual
dev node should not be escaped in the first place.

This is no longer true for 'modern' systems with udev.

libdevmapper no longer creates any /dev nodes - it's all job for udev.

And udev has had in dark ages the idea to use 'space' as a separator
for device names in device list. Thus it 'invented' escaping/mangling names.
(There are more prohibited characters which used to be used for normal device names (see man dmsetup mangling))

If you have system without udev - you could disable name mangling on i.e. dmsetup cmdline.

There is also envvar DM_DEFAULT_NAME_MANGLING_MODE_ENV_VAR_NAME
which could be used to set prefered behavior.

So there is no bug in libdm side - but I'll not comment on the rest...

I'll just note - it really means all tools now would need to be fixed to handle udev mangled names properly...

Regards

Zdenek


_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/




[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux