* lvrename changes link to direct /dev/dm-X
@ 2013-08-29 9:54 Oliver Rath
2013-08-30 9:09 ` Zdenek Kabelac
0 siblings, 1 reply; 5+ messages in thread
From: Oliver Rath @ 2013-08-29 9:54 UTC (permalink / raw)
To: lvm-devel
Hi list,
I was able to reproduze the renaming issue on a gentoo-machine with lvm-git:
heimserver ~ # lvcreate --name myoriginal -V 10M -T dmivg/winthinpool
Rounding up size to full physical extent 12,00 MiB
Logical volume "myoriginal" created
heimserver ~ # ls -l /dev/dmivg/myoriginal
lrwxrwxrwx 1 root root 28 29. Aug 11:46 /dev/dmivg/myoriginal ->
/dev/mapper/dmivg-myoriginal
heimserver ~ # lvrename /dev/dmivg/myoriginal myrenamedoriginal
Renamed "myoriginal" to "myrenamedoriginal" in volume group "dmivg"
heimserver ~ # ls -l /dev/dmivg/myrenamedoriginal
lrwxrwxrwx 1 root root 8 29. Aug 11:47 /dev/dmivg/myrenamedoriginal ->
../dm-13
heimserver ~ # ls -l /dev/mapper/dmivg-myrenamedoriginal
lrwxrwxrwx 1 root root 8 29. Aug 11:47
/dev/mapper/dmivg-myrenamedoriginal -> ../dm-13
It seems, that after renaming the link points directly to the /dev/dm-X
device, before that he linked to the link in /dev/mapper/..
In Ubuntu additionally there came an error-message "unable to rename ..."
The same in Ubuntu 12.04.03 with lvm-git:
root at asterisk:~# heimserver ~ # lvcreate --name myoriginal -V 10M -T
dmivg/winthinpool
heimserver: Befehl nicht gefunden.
root at asterisk:~# lvcreate --name myoriginal -V 10M -T dmivg/winthinpool
Rounding up size to full physical extent 12,00 MiB
Logical volume "myoriginal" created
root at asterisk:~# ls -l /dev/dmivg/myoriginal
lrwxrwxrwx 1 root root 28 Aug 29 11:50 /dev/dmivg/myoriginal ->
/dev/mapper/dmivg-myoriginal
root at asterisk:~# ls -l /dev/mapper/dmivg-myoriginal
lrwxrwxrwx 1 root root 8 Aug 29 11:50 /dev/mapper/dmivg-myoriginal ->
../dm-55
root at asterisk:~# lvrename /dev/dmivg/myoriginal myrenamedoriginal
Renamed "myoriginal" to "myrenamedoriginal" in volume group "dmivg"
Unable to rename device node from 'dmivg-myoriginal' to
'dmivg-myrenamedoriginal'
root at asterisk:~# ls -l /dev/dmivg/myrenamedoriginal
lrwxrwxrwx 1 root root 35 Aug 29 11:51 /dev/dmivg/myrenamedoriginal ->
/dev/mapper/dmivg-myrenamedoriginal
root at asterisk:~# ls -l /dev/mapper/dmivg-myrenamedoriginal
brw------- 1 root root 252, 55 Aug 29 11:51
/dev/mapper/dmivg-myrenamedoriginal
root at asterisk:~#
Here the device twice: in /dev/dm-55 _and_ in
/dev/mapper/dmivg-myrenamedoriginal
@Zdenek: if you need a -vvvv log, please tell me.
Tfh!
Oliver
^ permalink raw reply [flat|nested] 5+ messages in thread
* lvrename changes link to direct /dev/dm-X
2013-08-29 9:54 lvrename changes link to direct /dev/dm-X Oliver Rath
@ 2013-08-30 9:09 ` Zdenek Kabelac
2013-08-30 9:12 ` Zdenek Kabelac
2013-08-30 9:30 ` Oliver Rath
0 siblings, 2 replies; 5+ messages in thread
From: Zdenek Kabelac @ 2013-08-30 9:09 UTC (permalink / raw)
To: lvm-devel
Dne 29.8.2013 11:54, Oliver Rath napsal(a):
> Hi list,
>
> I was able to reproduze the renaming issue on a gentoo-machine with lvm-git:
>
> heimserver ~ # lvcreate --name myoriginal -V 10M -T dmivg/winthinpool
> Rounding up size to full physical extent 12,00 MiB
> Logical volume "myoriginal" created
> heimserver ~ # ls -l /dev/dmivg/myoriginal
> lrwxrwxrwx 1 root root 28 29. Aug 11:46 /dev/dmivg/myoriginal ->
> /dev/mapper/dmivg-myoriginal
So Gentoo has broken udev rules as well probably.
Links created by proper udev rules should be pointing directly to /dev/dm-x
Have you been compiling lvm2 yourself ?
Have you configured lvm2 package with --enable-udev_rules?
(it's not enabled by default)
Isn't there any udev falback running in this system ?
Isn't device activated without udev?
In pre-udev era all dm nodes have been created in /dev/mapper subdir.
So lvm created links pointing to this place.
With udev all dm nodes are by default created as /dev/dm-xx and all
the links in /dev/mapper & /dev/vgname/lvname are pointing directly
to this node - but that require proper udev rules and properly configured
system - I'd recommend to test with i.e. Fedora.
Unfortunately systems like Debian are using non-upstream udev rules
from maintainer which are reinventing them based on some unknown rules to us...
> heimserver ~ # lvrename /dev/dmivg/myoriginal myrenamedoriginal
> Renamed "myoriginal" to "myrenamedoriginal" in volume group "dmivg"
> heimserver ~ # ls -l /dev/dmivg/myrenamedoriginal
> lrwxrwxrwx 1 root root 8 29. Aug 11:47 /dev/dmivg/myrenamedoriginal ->
> ../dm-13
> heimserver ~ # ls -l /dev/mapper/dmivg-myrenamedoriginal
> lrwxrwxrwx 1 root root 8 29. Aug 11:47
> /dev/mapper/dmivg-myrenamedoriginal -> ../dm-13
>
>
> It seems, that after renaming the link points directly to the /dev/dm-X
> device, before that he linked to the link in /dev/mapper/..
Well as long as the point to the proper device at the end - it's at least
usable - but it's clear the udev dir has been probably touched by fallback
rules (which are there for cases, udev is failing to do proper thing)
> root at asterisk:~# ls -l /dev/mapper/dmivg-myoriginal
> lrwxrwxrwx 1 root root 8 Aug 29 11:50 /dev/mapper/dmivg-myoriginal ->
> ../dm-55
> root at asterisk:~# lvrename /dev/dmivg/myoriginal myrenamedoriginal
> Renamed "myoriginal" to "myrenamedoriginal" in volume group "dmivg"
> Unable to rename device node from 'dmivg-myoriginal' to
Udev rules are not doing what they supposed to do....
> 'dmivg-myrenamedoriginal'
> root at asterisk:~# ls -l /dev/dmivg/myrenamedoriginal
> lrwxrwxrwx 1 root root 35 Aug 29 11:51 /dev/dmivg/myrenamedoriginal ->
> /dev/mapper/dmivg-myrenamedoriginal
> root at asterisk:~# ls -l /dev/mapper/dmivg-myrenamedoriginal
> brw------- 1 root root 252, 55 Aug 29 11:51
> /dev/mapper/dmivg-myrenamedoriginal
> root at asterisk:~#
>
> Here the device twice: in /dev/dm-55 _and_ in
> /dev/mapper/dmivg-myrenamedoriginal
>
> @Zdenek: if you need a -vvvv log, please tell me.
If you have been compiling lvm2 yourself - you could replace upstream rules
with those placed in Debian.
I guess the only real solution here would be to build Debian package by some
lvm2 team member since the package in Debian is probably broken.
Zdenek
^ permalink raw reply [flat|nested] 5+ messages in thread
* lvrename changes link to direct /dev/dm-X
2013-08-30 9:09 ` Zdenek Kabelac
@ 2013-08-30 9:12 ` Zdenek Kabelac
2013-08-30 9:32 ` Oliver Rath
2013-08-30 9:30 ` Oliver Rath
1 sibling, 1 reply; 5+ messages in thread
From: Zdenek Kabelac @ 2013-08-30 9:12 UTC (permalink / raw)
To: lvm-devel
Dne 30.8.2013 11:09, Zdenek Kabelac napsal(a):
> Dne 29.8.2013 11:54, Oliver Rath napsal(a):
>> Hi list,
>>
>> I was able to reproduze the renaming issue on a gentoo-machine with lvm-git:
>>
>> heimserver ~ # lvcreate --name myoriginal -V 10M -T dmivg/winthinpool
>> Rounding up size to full physical extent 12,00 MiB
>> Logical volume "myoriginal" created
>> heimserver ~ # ls -l /dev/dmivg/myoriginal
>> lrwxrwxrwx 1 root root 28 29. Aug 11:46 /dev/dmivg/myoriginal ->
>> /dev/mapper/dmivg-myoriginal
>
> So Gentoo has broken udev rules as well probably.
> Links created by proper udev rules should be pointing directly to /dev/dm-x
>
>
> Have you been compiling lvm2 yourself ?
>
> Have you configured lvm2 package with --enable-udev_rules?
> (it's not enabled by default)
Sorry - here should be '--enable-udev_sync'
(And for built-in thin support you also need '--with-thin=internal')
Zdenek
^ permalink raw reply [flat|nested] 5+ messages in thread
* lvrename changes link to direct /dev/dm-X
2013-08-30 9:09 ` Zdenek Kabelac
2013-08-30 9:12 ` Zdenek Kabelac
@ 2013-08-30 9:30 ` Oliver Rath
1 sibling, 0 replies; 5+ messages in thread
From: Oliver Rath @ 2013-08-30 9:30 UTC (permalink / raw)
To: lvm-devel
Hi Zdenek!
Am 30.08.2013 11:09, schrieb Zdenek Kabelac:
> [..]
> So Gentoo has broken udev rules as well probably.
> Links created by proper udev rules should be pointing directly to
> /dev/dm-x
>
>
> Have you been compiling lvm2 yourself ?
Yes, I compiled it myself. There is no ebuild for git at the moment.
>
> Have you configured lvm2 package with --enable-udev_rules?
> (it's not enabled by default)
No, I dont. Thank you for the hint. I will try that.
>
> Isn't there any udev falback running in this system ?
I dont know, what udev fallback is. Where do I have to look?
>
> Isn't device activated without udev?
AFAIK udev is always running. I can make a try generating lvm-devices
without a running udevd.
>
> In pre-udev era all dm nodes have been created in /dev/mapper subdir.
> So lvm created links pointing to this place.
>
> With udev all dm nodes are by default created as /dev/dm-xx and all
> the links in /dev/mapper & /dev/vgname/lvname are pointing directly
> to this node - but that require proper udev rules and properly
> configured system - I'd recommend to test with i.e. Fedora.
ok
>
> Unfortunately systems like Debian are using non-upstream udev rules
> from maintainer which are reinventing them based on some unknown rules
> to us...
ok
>
>
>> heimserver ~ # lvrename /dev/dmivg/myoriginal myrenamedoriginal
>> Renamed "myoriginal" to "myrenamedoriginal" in volume group "dmivg"
>> heimserver ~ # ls -l /dev/dmivg/myrenamedoriginal
>> lrwxrwxrwx 1 root root 8 29. Aug 11:47 /dev/dmivg/myrenamedoriginal ->
>> ../dm-13
>> heimserver ~ # ls -l /dev/mapper/dmivg-myrenamedoriginal
>> lrwxrwxrwx 1 root root 8 29. Aug 11:47
>> /dev/mapper/dmivg-myrenamedoriginal -> ../dm-13
>>
>>
>> It seems, that after renaming the link points directly to the /dev/dm-X
>> device, before that he linked to the link in /dev/mapper/..
>
> Well as long as the point to the proper device at the end - it's at
> least usable - but it's clear the udev dir has been probably touched
> by fallback rules (which are there for cases, udev is failing to do
> proper thing)
Yes, thats a point: it still useable. But these broken rules can create
really strange results of linking an, if you are using the link-names
semanticly like me, you can run into serious problem although.
>
>
>> root at asterisk:~# ls -l /dev/mapper/dmivg-myoriginal
>> lrwxrwxrwx 1 root root 8 Aug 29 11:50 /dev/mapper/dmivg-myoriginal ->
>> ../dm-55
>> root at asterisk:~# lvrename /dev/dmivg/myoriginal myrenamedoriginal
>> Renamed "myoriginal" to "myrenamedoriginal" in volume group "dmivg"
>> Unable to rename device node from 'dmivg-myoriginal' to
>
> Udev rules are not doing what they supposed to do....
Ok
>
>> 'dmivg-myrenamedoriginal'
>> root at asterisk:~# ls -l /dev/dmivg/myrenamedoriginal
>> lrwxrwxrwx 1 root root 35 Aug 29 11:51 /dev/dmivg/myrenamedoriginal ->
>> /dev/mapper/dmivg-myrenamedoriginal
>> root at asterisk:~# ls -l /dev/mapper/dmivg-myrenamedoriginal
>> brw------- 1 root root 252, 55 Aug 29 11:51
>> /dev/mapper/dmivg-myrenamedoriginal
>> root at asterisk:~#
>>
>> Here the device twice: in /dev/dm-55 _and_ in
>> /dev/mapper/dmivg-myrenamedoriginal
>>
>> @Zdenek: if you need a -vvvv log, please tell me.
>
> If you have been compiling lvm2 yourself - you could replace upstream
> rules with those placed in Debian.
Im using debian (ubuntu) rules at the moment. Will try your
upstream-rules by configuring --with-thin=internall --enable-udev_sync
--enable-udev_rules
>
> I guess the only real solution here would be to build Debian package
> by some lvm2 team member since the package in Debian is probably broken.
This would be a great thing because the actual lvm-packages are really,
really outdated.
I will give you report of my results.
Tfh!
Oliver
^ permalink raw reply [flat|nested] 5+ messages in thread
* lvrename changes link to direct /dev/dm-X
2013-08-30 9:12 ` Zdenek Kabelac
@ 2013-08-30 9:32 ` Oliver Rath
0 siblings, 0 replies; 5+ messages in thread
From: Oliver Rath @ 2013-08-30 9:32 UTC (permalink / raw)
To: lvm-devel
Am 30.08.2013 11:12, schrieb Zdenek Kabelac:
> [..]
> Sorry - here should be '--enable-udev_sync'
> (And for built-in thin support you also need '--with-thin=internal')
>
A "./configure --help | grep udev" figured it out for me ;-)
Regards,
Oliver
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-08-30 9:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-29 9:54 lvrename changes link to direct /dev/dm-X Oliver Rath
2013-08-30 9:09 ` Zdenek Kabelac
2013-08-30 9:12 ` Zdenek Kabelac
2013-08-30 9:32 ` Oliver Rath
2013-08-30 9:30 ` Oliver Rath
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.