From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <530E3CAA.1070308@redhat.com> Date: Wed, 26 Feb 2014 20:12:42 +0100 From: Zdenek Kabelac MIME-Version: 1.0 References: <530E1EA8.9020301@ubuntu.com> <530E30B4.6020505@redhat.com> <530E3464.3050606@ubuntu.com> In-Reply-To: <530E3464.3050606@ubuntu.com> Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] libdevmapper's handling of devices with spaces in the name Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Phillip Susi , LVM general discussion and development Dne 26.2.2014 19:37, Phillip Susi napsal(a): > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 2/26/2014 1:21 PM, Zdenek Kabelac wrote: >> 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. > > So it is doing this to try and work around a bug in udev. Has this > been fixed in modern udev and should be safe to disable? It doesn't Unfortunately this is seen as a 'feature' of udev - so there is no plan to fix it in udev - since too many other things depends on the current naming logic (i.e all udev rules scripts written in bash would need major fixes to work with characters which are nontrivil to work with) All surrounding Gnome above it as well - you would be really amazed if you would check this deeply... > seem to work for me when I do with udev 204: I end up with > /dev/mapper/foo. > >> 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... > > The bug in libdm is that it is lieing to the calling application about > the name of the device, claiming it is not escaped, when in fact, it > is. Or is dm_task_get_name() supposed to return a human readable > string rather than the actual file name? If that is the case, how to > get the actual file name instead? As said - there is no bug in libdm - libdm expects udev to create nodes. You can reconfigure libdm to do this job instead of udev - but then nothing else will work with it - so it's basically dead-road... The best you can do is to not use names which needs mangling - that's my best suggestions (and lvm team already spend countless hours on some usable workarounds and solutions...) For mangling see 'dmsetup mangle' help - how to obtain device names... Zdenek