* dm targets with spaces in the name
@ 2008-12-03 17:03 Phillip Susi
2008-12-04 15:52 ` Heinz Mauelshagen
0 siblings, 1 reply; 11+ messages in thread
From: Phillip Susi @ 2008-12-03 17:03 UTC (permalink / raw)
To: device-mapper development
Is this allowed? It looks like you can create a target with a space in
the name, but then you can not refer to it in a rule of another target.
Specifically I am seeing a user with a dmraid setup with raid volumes
using spaces in the name, and dmraid manages to create the stripe target
( /dev/mapper/foo bar ), but then can not create the linear mapping on
top of it for the partition, because the table looks like it has too
many arguments due to the space.
So should you just avoid doing this, or should the kernel be fixed to
understand quotes or backslash escapes or something to allow spaces in
the target device file name?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: dm targets with spaces in the name
2008-12-03 17:03 dm targets with spaces in the name Phillip Susi
@ 2008-12-04 15:52 ` Heinz Mauelshagen
2008-12-04 20:15 ` Phillip Susi
2008-12-09 13:58 ` Arvin Schnell
0 siblings, 2 replies; 11+ messages in thread
From: Heinz Mauelshagen @ 2008-12-04 15:52 UTC (permalink / raw)
To: device-mapper development
Am Mittwoch, den 03.12.2008, 12:03 -0500 schrieb Phillip Susi:
> Is this allowed? It looks like you can create a target with a space in
> the name, but then you can not refer to it in a rule of another target.
> Specifically I am seeing a user with a dmraid setup with raid volumes
> using spaces in the name, and dmraid manages to create the stripe target
> ( /dev/mapper/foo bar ), but then can not create the linear mapping on
> top of it for the partition, because the table looks like it has too
> many arguments due to the space.
What you describe here, is essentially caused by bogus names in vendor
metadata not being detected and handled properly by dmraid.
Which metadata format is that being caused by ?
Can you send me the metadata sample retrieved via "dmraid -rD"
(bzip2/tar the resulting *.{dat,offset,size} files before sending) ?
> So should you just avoid doing this,
Yes, whitespace is not to be supported in mapped device names.
> or should the kernel be fixed to
> understand quotes or backslash escapes or something to allow spaces in
> the target device file name?
No M$ worries, please ;)
Heinz
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: dm targets with spaces in the name
2008-12-04 15:52 ` Heinz Mauelshagen
@ 2008-12-04 20:15 ` Phillip Susi
2008-12-05 1:59 ` Alasdair G Kergon
2008-12-09 13:58 ` Arvin Schnell
1 sibling, 1 reply; 11+ messages in thread
From: Phillip Susi @ 2008-12-04 20:15 UTC (permalink / raw)
To: heinzm, device-mapper development
Heinz Mauelshagen wrote:
> What you describe here, is essentially caused by bogus names in vendor
> metadata not being detected and handled properly by dmraid.
>
> Which metadata format is that being caused by ?
isw
> Can you send me the metadata sample retrieved via "dmraid -rD"
> (bzip2/tar the resulting *.{dat,offset,size} files before sending) ?
See https://bugs.launchpad.net/ubuntu/+source/dmraid/+bug/299311
and
http://launchpadlibrarian.net/19744950/dmraid%20dump.tar.gz
Basically the user named his volume "Mother Brain 2" when he created it
in the bios, so dmraid tries to create the target "isw_cfebfidbf_Mother
Brain 2" which works, but then it can't use that device as the target
for the partition linear mapping "isw_cfebfidbf_Mother Brain 21" ( that
would be "2p1" but for some reason debian/ubuntu have a patch that
removes the p ).
>> So should you just avoid doing this,
>
> Yes, whitespace is not to be supported in mapped device names.
Why not? File names with spaces in them are valid, even for dev nodes.
I can use dmsetup to create a device with a space in the name. It
seems like it should then be valid to use that device as a target in
another one.
>> or should the kernel be fixed to
>> understand quotes or backslash escapes or something to allow spaces in
>> the target device file name?
>
> No M$ worries, please ;)
Not sure what you mean there, but I actually took a look at the kernel
code, and it was failing to parse the correct number of arguments, but
it looks like dm_split_args() DOES understand backslash escaping. When
I backslash escape the spaces in the name, it appears to parse the
correct number of arguments, yet linear_ctr() still fails with "Device
lookup failure".
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: Re: dm targets with spaces in the name
2008-12-04 20:15 ` Phillip Susi
@ 2008-12-05 1:59 ` Alasdair G Kergon
2008-12-05 16:58 ` Phillip Susi
0 siblings, 1 reply; 11+ messages in thread
From: Alasdair G Kergon @ 2008-12-05 1:59 UTC (permalink / raw)
To: device-mapper development
I can't guarantee that names with spaces in them have had much testing
as LVM doesn't permit them. But device-mapper itself and dmsetup
are supposed to support them.
On Thu, Dec 04, 2008 at 03:15:51PM -0500, Phillip Susi wrote:
> Not sure what you mean there, but I actually took a look at the kernel
> code, and it was failing to parse the correct number of arguments, but
> it looks like dm_split_args() DOES understand backslash escaping. When
> I backslash escape the spaces in the name, it appears to parse the
> correct number of arguments, yet linear_ctr() still fails with "Device
> lookup failure".
Tools really should not be passing path names into constructors - use the
major:minor format instead as the in-kernel code paths are much more
predictable, there are fewer opportunities for races and so it offers
better control to the userspace code.
Alasdair
--
agk@redhat.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: dm targets with spaces in the name
2008-12-05 1:59 ` Alasdair G Kergon
@ 2008-12-05 16:58 ` Phillip Susi
2008-12-05 17:08 ` Alasdair G Kergon
0 siblings, 1 reply; 11+ messages in thread
From: Phillip Susi @ 2008-12-05 16:58 UTC (permalink / raw)
To: device-mapper development
Alasdair G Kergon wrote:
> I can't guarantee that names with spaces in them have had much testing
> as LVM doesn't permit them. But device-mapper itself and dmsetup
> are supposed to support them.
<snip>
> Tools really should not be passing path names into constructors - use the
> major:minor format instead as the in-kernel code paths are much more
> predictable, there are fewer opportunities for races and so it offers
> better control to the userspace code.
But if you run dmsetup and key in a table referencing a device with a
space in the name, that is what happens; linear_ctr gets passed
"/dev/foo bar" as the path argv. Shouldn't it then be just as capable
of opening the device as a call to open()?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Re: dm targets with spaces in the name
2008-12-05 16:58 ` Phillip Susi
@ 2008-12-05 17:08 ` Alasdair G Kergon
2008-12-08 20:31 ` Phillip Susi
0 siblings, 1 reply; 11+ messages in thread
From: Alasdair G Kergon @ 2008-12-05 17:08 UTC (permalink / raw)
To: device-mapper development
On Fri, Dec 05, 2008 at 11:58:30AM -0500, Phillip Susi wrote:
> Alasdair G Kergon wrote:
> >I can't guarantee that names with spaces in them have had much testing
> >as LVM doesn't permit them. But device-mapper itself and dmsetup
> >are supposed to support them.
> But if you run dmsetup and key in a table referencing a device with a
> space in the name, that is what happens; linear_ctr gets passed
> "/dev/foo bar" as the path argv.
which is a bug as per what I stated above, if true.
dmsetup knows nothing about the format of the table line - it's a simple
string - and should not be interfering with it: a backslash+space (after any
shell escaping) should get handled consistently, passed through to the target
and should work.
Alasdair
--
agk@redhat.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: dm targets with spaces in the name
2008-12-05 17:08 ` Alasdair G Kergon
@ 2008-12-08 20:31 ` Phillip Susi
2008-12-15 14:09 ` Heinz Mauelshagen
0 siblings, 1 reply; 11+ messages in thread
From: Phillip Susi @ 2008-12-08 20:31 UTC (permalink / raw)
To: device-mapper development
Alasdair G Kergon wrote:
> which is a bug as per what I stated above, if true.
>
> dmsetup knows nothing about the format of the table line - it's a simple
> string - and should not be interfering with it: a backslash+space (after any
> shell escaping) should get handled consistently, passed through to the target
> and should work.
Nevermind, I must have made a typeo before because now the kernel
accepts targets with spaces in the name just fine, as long as they are
properly backslash escaped.
Heinz, you mentioned that dmraid should just not be using names with
spaces in them. My first thought was to fix dmraid to backslash escape
the spaces, but you seem to have another idea in mind?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Re: dm targets with spaces in the name
2008-12-08 20:31 ` Phillip Susi
@ 2008-12-15 14:09 ` Heinz Mauelshagen
2008-12-15 16:18 ` Phillip Susi
0 siblings, 1 reply; 11+ messages in thread
From: Heinz Mauelshagen @ 2008-12-15 14:09 UTC (permalink / raw)
To: device-mapper development
Am Montag, den 08.12.2008, 15:31 -0500 schrieb Phillip Susi:
> Alasdair G Kergon wrote:
> > which is a bug as per what I stated above, if true.
> >
> > dmsetup knows nothing about the format of the table line - it's a simple
> > string - and should not be interfering with it: a backslash+space (after any
> > shell escaping) should get handled consistently, passed through to the target
> > and should work.
>
> Nevermind, I must have made a typeo before because now the kernel
> accepts targets with spaces in the name just fine, as long as they are
> properly backslash escaped.
>
> Heinz, you mentioned that dmraid should just not be using names with
> spaces in them. My first thought was to fix dmraid to backslash escape
> the spaces, but you seem to have another idea in mind?
We don't support them in dmraid and I find them principally bogus.
Why not use '_' instead to avoid parsing hassles ?
Heinz
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: dm targets with spaces in the name
2008-12-04 15:52 ` Heinz Mauelshagen
2008-12-04 20:15 ` Phillip Susi
@ 2008-12-09 13:58 ` Arvin Schnell
1 sibling, 0 replies; 11+ messages in thread
From: Arvin Schnell @ 2008-12-09 13:58 UTC (permalink / raw)
To: device-mapper development
On Thu, Dec 04, 2008 at 04:52:36PM +0100, Heinz Mauelshagen wrote:
> Am Mittwoch, den 03.12.2008, 12:03 -0500 schrieb Phillip Susi:
> > Is this allowed? It looks like you can create a target with a space in
> > the name, but then you can not refer to it in a rule of another target.
> > Specifically I am seeing a user with a dmraid setup with raid volumes
> > using spaces in the name, and dmraid manages to create the stripe target
> > ( /dev/mapper/foo bar ), but then can not create the linear mapping on
> > top of it for the partition, because the table looks like it has too
> > many arguments due to the space.
>
> What you describe here, is essentially caused by bogus names in vendor
> metadata not being detected and handled properly by dmraid.
>
> Which metadata format is that being caused by ?
>
> Can you send me the metadata sample retrieved via "dmraid -rD"
> (bzip2/tar the resulting *.{dat,offset,size} files before sending) ?
For some other BIOS RAID (AIC-9405 controller) you can find those
metadata in the openSUSE Bugilla:
https://bugzilla.novell.com/show_bug.cgi?id=396732#c28
Regards,
Arvin
--
Arvin Schnell, <aschnell@suse.de>
Software Engineer, Research & Development
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-12-16 8:55 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-03 17:03 dm targets with spaces in the name Phillip Susi
2008-12-04 15:52 ` Heinz Mauelshagen
2008-12-04 20:15 ` Phillip Susi
2008-12-05 1:59 ` Alasdair G Kergon
2008-12-05 16:58 ` Phillip Susi
2008-12-05 17:08 ` Alasdair G Kergon
2008-12-08 20:31 ` Phillip Susi
2008-12-15 14:09 ` Heinz Mauelshagen
2008-12-15 16:18 ` Phillip Susi
2008-12-16 8:55 ` Heinz Mauelshagen
2008-12-09 13:58 ` Arvin Schnell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.