Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 344405 - sys-fs/cryptsetup - dmcrypt init.d script causes many udev warnings
Summary: sys-fs/cryptsetup - dmcrypt init.d script causes many udev warnings
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-06 17:49 UTC by Wolfram
Modified: 2013-01-21 22:12 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info output (emerge.info.txt,16.91 KB, text/plain)
2010-11-23 15:20 UTC, Wolfram
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfram 2010-11-06 17:49:03 UTC
Any dmcrypt mapping in /etc/conf.d/dmcrypt causes ugly warnings on udev 151-r4 (Something like udevd-work[4135]: device node '/dev/mapper/test' already exists, link to '/dev/mapper/test' will not overwrite it) and TONS of significantly more ugly warnings on udev 164.

Looks like cryptsetup does something wrong, or, maybe it's bad udev rules, but situation looks more ugly on recent udev versions, so I think that it's cryptsetup failure.

Reproducible: Always

Steps to Reproduce:
1. Add dmcrypt mapping into /etc/conf.d/dmcrypt
2. rc-update add dmcrypt boot && reboot
3. Look at console...
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2010-11-23 14:32:40 UTC
Please post your `emerge --info' output in a comment.
Comment 2 Wolfram 2010-11-23 15:20:35 UTC
Created attachment 255187 [details]
emerge --info output

No problem, I've attached output
Comment 3 Manuel Danisch 2010-12-07 22:30:57 UTC
Same problem here. These are the relevant startup messages on my system:

* Setting up dm-crypt mappings ...
* Checking swap is not LUKS
* dm-crypt map crypt-swap ...
* cryptsetup will be called with : -c aes -h sha1 -d /dev/urandom create crypt-swap /dev/sda9
udevd-work[1556]: device node '/dev/mapper/crypt-swap' already exists, link to '/dev/mapper/crypt-swap' will not overwrite it
* Running pre_mount commands for crypt-swap ...
udevd-work[1556]: device node '/dev/mapper/crypt-swap' already exists, link to '/dev/mapper/crypt-swap' will not overwrite it

* dm-crypt map crypt-home ...
* cryptsetup will be called with :   luksOpen /dev/sda7 crypt-home
udevd-work[1556]: device node '/dev/mapper/temporary-cryptsetup-1752' already exists, link to '/dev/mapper/temporary-cryptsetup-1752' will not overwrite it

udevd-work[1556]: device node '/dev/mapper/crypt-home' already exists, link to '/dev/mapper/crypt-home' will not overwrite it
* Checking all filesystems ...
boot: sauber, 48/25688 Dateien, 17795/102400 Blöcke
home: sauber, 31092/327680 Dateien, 388185/1310463 Blöcke
* Mounting local filesystems ...
udevd-work[1556]: device node '/dev/mapper/crypt-home' already exists, link to '/dev/mapper/crypt-home' will not overwrite it
* Mounting security filesystem ...

After that, the system starts up without further error messages. When I shutdown the system, I get also one error message:

* Unmounting filesystems ...
udevd-work[12129]: device node '/dev/mapper/crypt-swap' already exists, link to '/dev/mapper/crypt-swap' will not overwrite it

/etc/conf.d/dmcrypt contains:

swap=crypt-swap
source='/dev/sda4'
pre_mount='mkswap -f -L swap ${dev}'

target=crypt-home
source='/dev/sda7'
key='/path/to/keyfile'

Although the system works fine, I'd really like to get rid of those messages :)
Comment 4 SpanKY gentoo-dev 2010-12-08 05:41:17 UTC
cryptsetup doesnt install any udev rules
Comment 5 Manuel Danisch 2010-12-08 09:40:56 UTC
Interesting. After SpanKY's comment I ran 'for file in /etc/udev/rules.d/*; do equery belongs $file; done'

The only two files without matching package were 99-local.rules (my own rules - at the moment only one rule to disable power management on my WD HDD) and 64-device-mapper.rules. Could it be that 64-device-mapper.rules is leftover from earlier versions of sys-fs/cryptsetup (or any other package) and can be deleted safely?
Comment 6 Manuel Danisch 2010-12-08 10:12:15 UTC
OK I was impatient, so I moved 64-device-mapper.rules away on my test-system and restarted the machine ;) All error messages are gone now, my crypt-partitions get mounted without a single problem. I checked the existence of some symlinks (e.g. in /dev/disk/by-label) and everything looks good so far.

So it seems to me that 64-device-mapper.rules is really a leftover from any previous stable package and it hasn't been removed during a system update.
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2013-01-21 22:12:38 UTC
(In reply to comment #6)
> OK I was impatient, so I moved 64-device-mapper.rules away on my test-system
> and restarted the machine ;) All error messages are gone now, my
> crypt-partitions get mounted without a single problem. I checked the
> existence of some symlinks (e.g. in /dev/disk/by-label) and everything looks
> good so far.
> 
> So it seems to me that 64-device-mapper.rules is really a leftover from any
> previous stable package and it hasn't been removed during a system update.

Closing this bug then.