linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: Phillip Susi <psusi@ubuntu.com>,
	LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] libdevmapper's handling of devices with spaces in the name
Date: Wed, 26 Feb 2014 22:40:06 +0100	[thread overview]
Message-ID: <530E5F36.5070002@redhat.com> (raw)
In-Reply-To: <530E541C.9040001@ubuntu.com>

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
>> dead-road...
>
> 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
>> names...
>
> Is there a libdevmapper call to do this?
>


https://git.fedorahosted.org/cgit/lvm2.git/tree/libdm/libdevmapper.h

Look for 'mangle' in function names.

For 'howto' look at dmsetup.c source code:

https://git.fedorahosted.org/cgit/lvm2.git/tree/tools/dmsetup.c

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...

Regards

Zdenek

  reply	other threads:[~2014-02-26 21:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26 17:04 [linux-lvm] libdevmapper's handling of devices with spaces in the name Phillip Susi
2014-02-26 18:21 ` Zdenek Kabelac
2014-02-26 18:37   ` Phillip Susi
2014-02-26 19:12     ` Zdenek Kabelac
2014-02-26 20:52       ` Phillip Susi
2014-02-26 21:40         ` Zdenek Kabelac [this message]
2014-02-26 22:17           ` Phillip Susi
2014-02-26 23:26             ` Alasdair G Kergon
2014-02-27  8:51             ` Peter Rajnoha
2014-02-27  9:08             ` 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=530E5F36.5070002@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=linux-lvm@redhat.com \
    --cc=psusi@ubuntu.com \
    /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).