* [dm-crypt] Problem with udev and dmcrpyt
@ 2010-07-16 2:44 Aaron Lewis
2010-07-16 7:42 ` Milan Broz
0 siblings, 1 reply; 10+ messages in thread
From: Aaron Lewis @ 2010-07-16 2:44 UTC (permalink / raw)
To: dm-crypt
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
I'm setting up dmcrypt , but i've got those kernel messages:
udevd-work[7416]: kernel-provided name 'dm-2' and NAME= 'mapper/crypt_0'
disagree, please use SYMLINK+= or change the kernel to provide the
proper name
So i put udev rules like this:
KERNEL=="dm-0",NAME="dm-0",SYMLINK+="mapper/home"
KERNEL=="dm-1",NAME="dm-1",SYMLINK+="mapper/code"
But another warning came out:
udevd-work[5650]: device node '/dev/dm-0' already exists, link to
'/dev/dm-0' will not overwrite it
How can i get rid of that together ?
Many thanks.
- --
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkw/x5UACgkQvf41sEptMqASdgCgn1j+0kCSOPidfS+GdFFJUQhS
sqkAoKtSC8zrP9bM+EmwSQJMNS4B8Gdj
=p9Wv
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dm-crypt] Problem with udev and dmcrpyt
2010-07-16 2:44 [dm-crypt] Problem with udev and dmcrpyt Aaron Lewis
@ 2010-07-16 7:42 ` Milan Broz
2010-07-16 10:53 ` Aaron Lewis
0 siblings, 1 reply; 10+ messages in thread
From: Milan Broz @ 2010-07-16 7:42 UTC (permalink / raw)
To: Aaron Lewis; +Cc: dm-crypt
On 07/16/2010 04:44 AM, Aaron Lewis wrote:
> udevd-work[7416]: kernel-provided name 'dm-2' and NAME= 'mapper/crypt_0'
> disagree, please use SYMLINK+= or change the kernel to provide the
> proper name
>
>
> So i put udev rules like this:
>
> KERNEL=="dm-0",NAME="dm-0",SYMLINK+="mapper/home"
> KERNEL=="dm-1",NAME="dm-1",SYMLINK+="mapper/code"
This is completely wrong, never do that. dm-X names are dynamic.
No need to worry about the warning above if it works.
> How can i get rid of that together ?
Update package which provides DM new rules. Yor distro should provide
it if they update udev.
Milan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dm-crypt] Problem with udev and dmcrpyt
2010-07-16 7:42 ` Milan Broz
@ 2010-07-16 10:53 ` Aaron Lewis
2010-07-16 11:00 ` Thomas Bächler
2010-07-16 11:20 ` Milan Broz
0 siblings, 2 replies; 10+ messages in thread
From: Aaron Lewis @ 2010-07-16 10:53 UTC (permalink / raw)
Cc: dm-crypt
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Thanks Milan.
On 07/16/2010 03:42 PM, Milan Broz wrote::
>>
>> KERNEL=="dm-0",NAME="dm-0",SYMLINK+="mapper/home"
>> KERNEL=="dm-1",NAME="dm-1",SYMLINK+="mapper/code"
>
> This is completely wrong, never do that. dm-X names are dynamic.
> No need to worry about the warning above if it works.
device name is dynamiclly allocated , i think so.
Shouldn't there be some ways to identify it like UUID ? In that case ,
i'll be able to put more accurate rules.
>
>> How can i get rid of that together ?
>
> Update package which provides DM new rules. Yor distro should provide
> it if they update udev.
Guess gentoo never provide such services.
>
> Milan
every time when i'm booting , after putting my credentials , those
messages appear , it's harmless..Hmm , i just want to keep it somewhat
`clean'.
- --
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkxAOioACgkQvf41sEptMqCOFwCgpYEV3FKBoO9qM+6PtQFHoih0
4boAnRXIklS9LRVrKdNGVW99kLDOSqZr
=7RiK
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dm-crypt] Problem with udev and dmcrpyt
2010-07-16 10:53 ` Aaron Lewis
@ 2010-07-16 11:00 ` Thomas Bächler
2010-07-16 11:15 ` Aaron Lewis
2010-07-16 11:20 ` Milan Broz
1 sibling, 1 reply; 10+ messages in thread
From: Thomas Bächler @ 2010-07-16 11:00 UTC (permalink / raw)
To: Aaron Lewis; +Cc: dm-crypt
[-- Attachment #1: Type: text/plain, Size: 752 bytes --]
Am 16.07.2010 12:53, schrieb Aaron Lewis:
> device name is dynamiclly allocated , i think so.
> Shouldn't there be some ways to identify it like UUID ? In that case ,
> i'll be able to put more accurate rules.
The "name" is whatever you call it when you run cryptsetup luksOpen (or
create). The file system inside the volume can be identified by UUID as
any file system can.
>>> How can i get rid of that together ?
>
>> Update package which provides DM new rules. Yor distro should provide
>> it if they update udev.
>
> Guess gentoo never provide such services.
They should. Upstream device mapper provides udev rules that should be
installed with device-mapper. If no udev rules are installed, I would
consider that a bug.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dm-crypt] Problem with udev and dmcrpyt
2010-07-16 11:00 ` Thomas Bächler
@ 2010-07-16 11:15 ` Aaron Lewis
2010-07-16 11:26 ` Milan Broz
0 siblings, 1 reply; 10+ messages in thread
From: Aaron Lewis @ 2010-07-16 11:15 UTC (permalink / raw)
Cc: dm-crypt
On 07/16/2010 07:00 PM, Thomas Bächler wrote:
> Am 16.07.2010 12:53, schrieb Aaron Lewis:
>> device name is dynamiclly allocated , i think so.
>> Shouldn't there be some ways to identify it like UUID ? In that case ,
>> i'll be able to put more accurate rules.
>
> The "name" is whatever you call it when you run cryptsetup luksOpen (or
> create). The file system inside the volume can be identified by UUID as
> any file system can.
For example ? With udev rules or dmcrypt configurations ?
>
>>>> How can i get rid of that together ?
>>
>>> Update package which provides DM new rules. Yor distro should provide
>>> it if they update udev.
>>
>> Guess gentoo never provide such services.
>
> They should. Upstream device mapper provides udev rules that should be
> installed with device-mapper. If no udev rules are installed, I would
> consider that a bug.
>
--
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dm-crypt] Problem with udev and dmcrpyt
2010-07-16 10:53 ` Aaron Lewis
2010-07-16 11:00 ` Thomas Bächler
@ 2010-07-16 11:20 ` Milan Broz
1 sibling, 0 replies; 10+ messages in thread
From: Milan Broz @ 2010-07-16 11:20 UTC (permalink / raw)
To: Aaron Lewis; +Cc: dm-crypt
On 07/16/2010 12:53 PM, Aaron Lewis wrote:
>> Update package which provides DM new rules. Yor distro should provide
>> it if they update udev.
>
> Guess gentoo never provide such services.
It does, I am using it there:-)
maybe it is masked - that's bug, lvm must depend on new rules/udev then.
Long answer for the archive:
Formerly LVM/DM/cryptsetup managed dev nodes itself.
Later it started to utilize udev for this job, but the transition process
was very painfull and had many iterations. DM used some extension to block
device concept which were incompatible with udev view and vice versa.
So there were several versions of udev rules using various udev extensions,
some of these extension were removed from udev in later releases
(changing base device name is one of them).
It probably takes some time until all changes are propagated to distros...
Bu we finally iterated to situation that udev rules are now working properly
- with compromises on both sides.
(Only one problems remains - namely "watch" rule but is is not related to this problem).
Still, there is fallback mechanism in libdevampper - if the required device node
is not created by udev, it fallback to manual node creation.
(So even in misconfigured system it should work.)
The above means, that distro maintainers should start to compile lvm with udev
support, provide most recent udev rules (part of upstream lvm2/dm package)
and require new udev package which includes all require functionality.
Milan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dm-crypt] Problem with udev and dmcrpyt
2010-07-16 11:15 ` Aaron Lewis
@ 2010-07-16 11:26 ` Milan Broz
2010-07-16 11:59 ` Aaron Lewis
0 siblings, 1 reply; 10+ messages in thread
From: Milan Broz @ 2010-07-16 11:26 UTC (permalink / raw)
To: Aaron Lewis; +Cc: dm-crypt
On 07/16/2010 01:15 PM, Aaron Lewis wrote:
>> The "name" is whatever you call it when you run cryptsetup luksOpen (or
>> create). The file system inside the volume can be identified by UUID as
>> any file system can.
>
> For example ? With udev rules or dmcrypt configurations ?
See ehat dm udev rules is doing - using DM_NAME attribute to create symlinks etc.
There is nothing special needed for dm-crypt - DM rules are common.
ls /lib/udev/rules.d/*-dm-*
/lib/udev/rules.d/11-dm-lvm.rules
/lib/udev/rules.d/13-dm-disk.rules
/lib/udev/rules.d/95-dm-notify.rules
(on my Gentoo test system)
No need to hack udev rules yourself and reinvent the wheel.
Milan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dm-crypt] Problem with udev and dmcrpyt
2010-07-16 11:26 ` Milan Broz
@ 2010-07-16 11:59 ` Aaron Lewis
2010-07-16 13:24 ` Milan Broz
0 siblings, 1 reply; 10+ messages in thread
From: Aaron Lewis @ 2010-07-16 11:59 UTC (permalink / raw)
Cc: dm-crypt
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 07/16/2010 07:26 PM, Milan Broz wrote:
> On 07/16/2010 01:15 PM, Aaron Lewis wrote:
>
>>> The "name" is whatever you call it when you run cryptsetup luksOpen (or
>>> create). The file system inside the volume can be identified by UUID as
>>> any file system can.
>>
>> For example ? With udev rules or dmcrypt configurations ?
>
> See ehat dm udev rules is doing - using DM_NAME attribute to create symlinks etc.
> There is nothing special needed for dm-crypt - DM rules are common.
>
> ls /lib/udev/rules.d/*-dm-*
> /lib/udev/rules.d/11-dm-lvm.rules
> /lib/udev/rules.d/13-dm-disk.rules
> /lib/udev/rules.d/95-dm-notify.rules
Yep , so udev reads two directory as configurations ?
+ /etc/udev/rules.d
+ /lib/udev/rules.d
All Right , i removed my hacks , now:
%> sudo cryptsetup luksClose /dev/mapper/code
%> sudo cryptsetup luksOpen /dev/sda8 code
Kernel Messages:
udevd-work[11168]: kernel-provided name 'dm-1' and NAME=
'mapper/temporary-cryptsetup-11166' disagree, please use SYMLINK+= or
change the kernel to provide the proper name
udevd-work[11168]: device node '/dev/mapper/temporary-cryptsetup-11166'
already exists, link to '/dev/mapper/temporary-cryptsetup-11166' will
not overwrite it
udevd-work[11168]: kernel-provided name 'dm-1' and NAME= 'mapper/code'
disagree, please use SYMLINK+= or change the kernel to provide the
proper name
udevd-work[11168]: device node '/dev/mapper/code' already exists, link
to '/dev/mapper/code' will not overwrite it
Doesn't looks like anybody else , wired problem.
I should be able to get rid of those messages , right ?
Many thanks.
- --
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkxASZ4ACgkQvf41sEptMqCKhQCfbCvgWy3lAyMPwCmVMpCO5rRr
c7oAnRzR4mMJI8FHkS5XUNKC72FeAarS
=Ml7s
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dm-crypt] Problem with udev and dmcrpyt
2010-07-16 11:59 ` Aaron Lewis
@ 2010-07-16 13:24 ` Milan Broz
2010-07-16 15:22 ` Aaron Lewis
0 siblings, 1 reply; 10+ messages in thread
From: Milan Broz @ 2010-07-16 13:24 UTC (permalink / raw)
To: Aaron Lewis; +Cc: dm-crypt
> udevd-work[11168]: kernel-provided name 'dm-1' and NAME= 'mapper/code'
> disagree, please use SYMLINK+= or change the kernel to provide the
> proper name
> Doesn't looks like anybody else , wired problem.
> I should be able to get rid of those messages , right ?
it is known problem, upgrade package providing dm rules or downgrade udev.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581593#24
But is is just warning, it should still work.
Milan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dm-crypt] Problem with udev and dmcrpyt
2010-07-16 13:24 ` Milan Broz
@ 2010-07-16 15:22 ` Aaron Lewis
0 siblings, 0 replies; 10+ messages in thread
From: Aaron Lewis @ 2010-07-16 15:22 UTC (permalink / raw)
Cc: dm-crypt
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 07/16/2010 09:24 PM, Milan Broz wrote:
> it is known problem, upgrade package providing dm rules or downgrade udev.
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581593#24
>
> But is is just warning, it should still work.
Still work , with a bunch of warnings , and checked udev version on my
system , it's
udev-160.
Okay , i'd put this off for a while.
>
> Milan
>
- --
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkxAeRcACgkQvf41sEptMqB6DACfRGza28u9akUoa9o17v2GJWfk
T+kAnj8JRLdRkrJMeO7MZRHOuijszJ6n
=4tTW
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-07-16 15:29 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-16 2:44 [dm-crypt] Problem with udev and dmcrpyt Aaron Lewis
2010-07-16 7:42 ` Milan Broz
2010-07-16 10:53 ` Aaron Lewis
2010-07-16 11:00 ` Thomas Bächler
2010-07-16 11:15 ` Aaron Lewis
2010-07-16 11:26 ` Milan Broz
2010-07-16 11:59 ` Aaron Lewis
2010-07-16 13:24 ` Milan Broz
2010-07-16 15:22 ` Aaron Lewis
2010-07-16 11:20 ` Milan Broz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox