All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] /dev/dm-0 instead of /dev/mapper/mygroup-myvol in "mount" output
@ 2010-07-09  7:53 Benjamin Henrion
  2010-07-09  8:54 ` Benjamin Henrion
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Henrion @ 2010-07-09  7:53 UTC (permalink / raw)
  To: linux-lvm

Hi,

I have managed to setup an LVM loopback file as a harddisk to mount.

Now, I need the vzdump utility to detect the fact that it is LVM
based, and it keeps saying that it cannot detect the LVM volume group:

http://openvz.org/pipermail/users/2010-July/003623.html

"unable to detect lvm volume group"

Everything works fine when mount displays that the file is mounted
with /dev/mapper/mygroup-myvol, on the opposite, it does not work when
mount outputs /dev/dm-0 in its list.

Any idea how I could force mount to use /dev/mapper/mygroup-myvol
instead of /dev/dm-0?

Best,

-- 
Benjamin Henrion <bhenrion@ffii.org>
FFII Brussels - +32-484-566109 - +32-2-4148403
"In July 2005, after several failed attempts to legalise software
patents in Europe, the patent establishment changed its strategy.
Instead of explicitly seeking to sanction the patentability of
software, they are now seeking to create a central European patent
court, which would establish and enforce patentability rules in their
favor, without any possibility of correction by competing courts or
democratically elected legislators."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] /dev/dm-0 instead of /dev/mapper/mygroup-myvol in "mount" output
  2010-07-09  7:53 [linux-lvm] /dev/dm-0 instead of /dev/mapper/mygroup-myvol in "mount" output Benjamin Henrion
@ 2010-07-09  8:54 ` Benjamin Henrion
  2010-07-09 11:38   ` Peter Rajnoha
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Henrion @ 2010-07-09  8:54 UTC (permalink / raw)
  To: linux-lvm

On Fri, Jul 9, 2010 at 9:53 AM, Benjamin Henrion <bh@udev.org> wrote:
> Hi,
>
> I have managed to setup an LVM loopback file as a harddisk to mount.
>
> Now, I need the vzdump utility to detect the fact that it is LVM
> based, and it keeps saying that it cannot detect the LVM volume group:
>
> http://openvz.org/pipermail/users/2010-July/003623.html
>
> "unable to detect lvm volume group"
>
> Everything works fine when mount displays that the file is mounted
> with /dev/mapper/mygroup-myvol, on the opposite, it does not work when
> mount outputs /dev/dm-0 in its list.
>
> Any idea how I could force mount to use /dev/mapper/mygroup-myvol
> instead of /dev/dm-0?

On one machine it creates rightly a device on /dev/mapper:

root@buzek /dev/mapper [68]# l
total 0
crw-rw---- 1 root root  10, 59 2010-07-09 09:32 control
brw-rw---- 1 root disk 254,  0 2010-07-09 10:44 openvzgroup-openvzvol

While on the other machine where is does not work, it makes a symlink
to /dev/dm-0:

root@chainsaw /dev/mapper [25]# l
total 0
crw-rw---- 1 root root 10, 59 2010-07-09 10:28 control
lrwxrwxrwx 1 root root      7 2010-07-09 10:46 openvzgroup-openvzvol -> ../dm-0

Any idea why this difference?

-- 
Benjamin Henrion <bhenrion@ffii.org>
FFII Brussels - +32-484-566109 - +32-2-4148403
"In July 2005, after several failed attempts to legalise software
patents in Europe, the patent establishment changed its strategy.
Instead of explicitly seeking to sanction the patentability of
software, they are now seeking to create a central European patent
court, which would establish and enforce patentability rules in their
favor, without any possibility of correction by competing courts or
democratically elected legislators."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] /dev/dm-0 instead of /dev/mapper/mygroup-myvol in "mount" output
  2010-07-09  8:54 ` Benjamin Henrion
@ 2010-07-09 11:38   ` Peter Rajnoha
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Rajnoha @ 2010-07-09 11:38 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Benjamin Henrion

On 07/09/2010 10:54 AM, Benjamin Henrion wrote:
> On Fri, Jul 9, 2010 at 9:53 AM, Benjamin Henrion <bh@udev.org> wrote:
>> Hi,
>>
>> I have managed to setup an LVM loopback file as a harddisk to mount.
>>
>> Now, I need the vzdump utility to detect the fact that it is LVM
>> based, and it keeps saying that it cannot detect the LVM volume group:
>>
>> http://openvz.org/pipermail/users/2010-July/003623.html
>>
>> "unable to detect lvm volume group"
>>
>> Everything works fine when mount displays that the file is mounted
>> with /dev/mapper/mygroup-myvol, on the opposite, it does not work when
>> mount outputs /dev/dm-0 in its list.
>>
>> Any idea how I could force mount to use /dev/mapper/mygroup-myvol
>> instead of /dev/dm-0?
> 

As for the "mount", it should be fixed already to handle /dev/dm-X
nodes properly and it should resolve the dm-X (internal kernel) name
into a real device-mapper name (util-linux-ng >= 2.17). Recent
versions of mount should work regardless of the the input that
was given initially, /dev/mapper/<real-dm-name> node (symlink)
or /dev/dm-X node.

> On one machine it creates rightly a device on /dev/mapper:
> 

That's the older layout without udev interfering where the nodes
in /dev/mapper are created by device-mapper library directly (this
is still supported as a fallback or if udev support is disabled in
compile time or while using udev_rules = 0 setting in lvm.conf).

> root@buzek /dev/mapper [68]# l
> total 0
> crw-rw---- 1 root root  10, 59 2010-07-09 09:32 control
> brw-rw---- 1 root disk 254,  0 2010-07-09 10:44 openvzgroup-openvzvol
> 
> While on the other machine where is does not work, it makes a symlink
> to /dev/dm-0:
> 

Yes, when udev support is enabled in LVM, the /dev/mapper/<name> is
a symlink to /dev/dm-X (this was chosen to comply with udev
requirements).

> root@chainsaw /dev/mapper [25]# l
> total 0
> crw-rw---- 1 root root 10, 59 2010-07-09 10:28 control
> lrwxrwxrwx 1 root root      7 2010-07-09 10:46 openvzgroup-openvzvol -> ../dm-0
> 
> Any idea why this difference?

Just different versions of lvm2 involved, I suppose...

If there are any other utilities still having problems with the
new /dev layout, then they need to be corrected and they need to
fix any assumptions about /dev/mapper content.

Peter

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-09 11:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-09  7:53 [linux-lvm] /dev/dm-0 instead of /dev/mapper/mygroup-myvol in "mount" output Benjamin Henrion
2010-07-09  8:54 ` Benjamin Henrion
2010-07-09 11:38   ` Peter Rajnoha

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.