Gentoo Archives: gentoo-user

From: "J. Roeleveld" <joost@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Problems with loop-aes
Date: Wed, 07 May 2014 06:11:59
Message-Id: 2812089.ihluqybgHf@andromeda
In Reply to: Re: [gentoo-user] Problems with loop-aes by Walter Dnes
1 On Tuesday, May 06, 2014 05:34:52 PM Walter Dnes wrote:
2 > On Tue, May 06, 2014 at 08:45:01PM +0200, J. Roeleveld wrote
3 >
4 > > On Tuesday, May 06, 2014 02:31:08 PM Walter Dnes wrote:
5 > > > I'm trying to set up USB-key-encryption for use with a laptop. I'm
6 > > >
7 > > > running mdev instead of udev on the laptop, so lvm doesn't work.
8 > >
9 > > I find this strange, as LVM can manage the /dev-entries directly.
10 > > On my systems, this is necessary as udev regularly fails to properly
11 > > handle
12 > > these entries.
13 > >
14 > > Eg. the following setting: " verify_udev_operations = 1 "
15 > > There are other options for udev documented in /etc/lvm/lvm.conf.
16 >
17 > Unfortunately, mdev != udev. People running RAID have problems too.
18
19 I know it isn't. I just find it strange that LVM can't work without udev when I
20 see options which configure the LVM-tools to either double-check udevs actions
21 or even completely bypass udev:
22 ***
23
24 # Set to 0 to disable udev synchronisation (if compiled into the
25 binaries).
26 # Processes will not wait for notification from udev.
27 # They will continue irrespective of any possible udev processing
28 # in the background. You should only use this if udev is not running
29 # or has rules that ignore the devices LVM2 creates.
30 # The command line argument --nodevsync takes precedence over this
31 setting.
32 # If set to 1 when udev is not running, and there are LVM2 processes
33 # waiting for udev, run 'dmsetup udevcomplete_all' manually to wake them
34 up.
35 udev_sync = 1
36
37 # Set to 0 to disable the udev rules installed by LVM2 (if built with
38 # --enable-udev_rules). LVM2 will then manage the /dev nodes and symlinks
39 # for active logical volumes directly itself.
40 # N.B. Manual intervention may be required if this setting is changed
41 # while any logical volumes are active.
42 udev_rules = 1
43
44 # Set to 1 for LVM2 to verify operations performed by udev. This turns on
45 # additional checks (and if necessary, repairs) on entries in the device
46 # directory after udev has completed processing its events.
47 # Useful for diagnosing problems with LVM2/udev interactions.
48 verify_udev_operations = 1
49
50
51 ***
52
53 > > I believe " cryptsetup " does not use the LVM tools. But has a new device
54 > > created by the kernel directly, which should be picked up by a device
55 > > manager directly.
56 >
57 > But cryptsetup pulls in lvm2 as a dependancy...
58 >
59 > [d531][waltdnes][~] emerge -pv cryptsetup
60 >
61 > These are the packages that would be merged, in order:
62 >
63 > Calculating dependencies... done!
64 > [ebuild N ] sys-fs/lvm2-2.02.103 USE="readline (-clvm) (-cman) -lvm1
65 > -lvm2create_initrd (-selinux) -static -static-libs -thin -udev" 1,313 kB
66 > [ebuild N ] sys-fs/cryptsetup-1.6.2 USE="openssl -gcrypt -kernel
67 > -nettle -nls -python -reencrypt -static -static-libs -udev -urandom"
68 > PYTHON_SINGLE_TARGET="python2_7 -python2_6" PYTHON_TARGETS="python2_7
69 > -python2_6" 1,162 kB
70
71 You need it for the device-mapper stuff. That might also listen to the above
72 setting in /etc/lvm/lvm.conf.
73
74 Can you try setting the above one to " 0" and re-test?
75 I don't have any machine with mdev to test myself.
76
77 Also, the following page seems to indicate cryptsetup, LVM and mdev do work
78 together:
79 http://jootamam.net/howto-basic-cryptsetup.htm
80 This works inside an initramfs and I don't see a reason why it can't work
81 outside of the initramfs.
82
83 --
84 Joost

Replies

Subject Author
[gentoo-user] [SOLVED] Running cryptsetup under mdev Walter Dnes <waltdnes@××××××××.org>