Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 351251 - dsys-fs/cryptsetup - dmcrypt needs device-mapper (init script) which is set to start after lvm
Summary: dsys-fs/cryptsetup - dmcrypt needs device-mapper (init script) which is set t...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-09 21:55 UTC by Jochen Klein
Modified: 2011-01-18 20:05 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jochen Klein 2011-01-09 21:55:28 UTC
The dmcrypt init script has the device-mapper service set as needed (baselayout-2), and device-mapper is set to start only after lvm. Thus, dmcrypt can only be started after lvm, which is inappropriate for LVM on top of dmcrypt; setting rc_before="lvm" in /etc/conf.d/dmcrypt fails to due the created circular dependency.

The problem can be cured by removing the dm dependency (rc_need="! device-mapper" in /etc/conf.d/dmcrypt) which is not clear to me in the first place: Shouldn't the dm kernel support be sufficient for dmcrypt to start? Of course, depending on the kernel this may require to load dm_mod but that can be done without starting the device-mapper service (s. lvm).

Can the following lines be removed from depend() in /etc/init.d/dmcrypt
  if [ -e /lib/librc.so ]; then
    need device-mapper
  fi

Or are they needed for something else? If yes, how can LVM on top of dmcrypt be realized upon system start.
Comment 1 SpanKY gentoo-dev 2011-01-18 20:05:49 UTC
i cant think of a reason for hard requiring it for everyone.  it's supposed to be designed for people to opt into their requirements via conf.d rc_need.

http://sources.gentoo.org/sys-fs/cryptsetup/files/1.0.5-dmcrypt.rc?r1=1.3&r2=1.4