[linux-lvm] libdevmapper's handling of devices with spaces in the name
zkabelac at redhat.com
Wed Feb 26 21:40:06 UTC 2014
Dne 26.2.2014 21:52, Phillip Susi napsal(a):
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> On 2/26/2014 2:12 PM, Zdenek Kabelac wrote:
>> 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
> It doesn't matter who creates it, what matters is that when parted
> asks what the correct name is, that it be told the name that actually
> is created.
I assume you will need to learn why it does matter - it's the crucial part of
this puzzle - but it's surely not a topic for lvm-devel list.
And as I've also already said - yes it really does mean that many userspace
tools need be adapted to handle things in more user friendly way.
>> 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...)
> Unfortunately, it seems that a number of hardware vendors ship
> preconfigured fakeraid setups with a space in the name of the volume.
It have to be dealt with them properly on user level part.
User level needs to use some different names for such devices.
It's currently highly discouraged to create devices with 'prohibited'
characters in them - since the rest will fail to process them properly.
You really can't expect udev will start to support spaces in names....
So tools like 'mount' will need to know how to translate...
>> For mangling see 'dmsetup mangle' help - how to obtain device
> Is there a libdevmapper call to do this?
Look for 'mangle' in function names.
For 'howto' look at dmsetup.c source code:
There is not much better doc for these function unfortunately.
I'd strongly advise to stay on 'dmsetup' level of usage.
It would also probably help to describe what kind of app which uses
libdevmapper you are trying to develop...
More information about the linux-lvm