On Tuesday, May 06, 2014 05:34:52 PM Walter Dnes wrote:
> On Tue, May 06, 2014 at 08:45:01PM +0200, J. Roeleveld wrote
>
> > On Tuesday, May 06, 2014 02:31:08 PM Walter Dnes wrote:
> > > I'm trying to set up USB-key-encryption for use with a laptop. I'm
> > >
> > > running mdev instead of udev on the laptop, so lvm doesn't work.
> >
> > I find this strange, as LVM can manage the /dev-entries directly.
> > On my systems, this is necessary as udev regularly fails to properly
> > handle
> > these entries.
> >
> > Eg. the following setting: " verify_udev_operations = 1 "
> > There are other options for udev documented in /etc/lvm/lvm.conf.
>
> Unfortunately, mdev != udev. People running RAID have problems too.
I know it isn't. I just find it strange that LVM can't work without udev when I
see options which configure the LVM-tools to either double-check udevs actions
or even completely bypass udev:
***
# Set to 0 to disable udev synchronisation (if compiled into the
binaries).
# Processes will not wait for notification from udev.
# They will continue irrespective of any possible udev processing
# in the background. You should only use this if udev is not running
# or has rules that ignore the devices LVM2 creates.
# The command line argument --nodevsync takes precedence over this
setting.
# If set to 1 when udev is not running, and there are LVM2 processes
# waiting for udev, run 'dmsetup udevcomplete_all' manually to wake them
up.
udev_sync = 1
# Set to 0 to disable the udev rules installed by LVM2 (if built with
# --enable-udev_rules). LVM2 will then manage the /dev nodes and symlinks
# for active logical volumes directly itself.
# N.B. Manual intervention may be required if this setting is changed
# while any logical volumes are active.
udev_rules = 1
# Set to 1 for LVM2 to verify operations performed by udev. This turns on
# additional checks (and if necessary, repairs) on entries in the device
# directory after udev has completed processing its events.
# Useful for diagnosing problems with LVM2/udev interactions.
verify_udev_operations = 1
***
> > I believe " cryptsetup " does not use the LVM tools. But has a new device
> > created by the kernel directly, which should be picked up by a device
> > manager directly.
>
> But cryptsetup pulls in lvm2 as a dependancy...
>
> [d531][waltdnes][~] emerge -pv cryptsetup
>
> These are the packages that would be merged, in order:
>
> Calculating dependencies... done!
> [ebuild N ] sys-fs/lvm2-2.02.103 USE="readline (-clvm) (-cman) -lvm1
> -lvm2create_initrd (-selinux) -static -static-libs -thin -udev" 1,313 kB
> [ebuild N ] sys-fs/cryptsetup-1.6.2 USE="openssl -gcrypt -kernel
> -nettle -nls -python -reencrypt -static -static-libs -udev -urandom"
> PYTHON_SINGLE_TARGET="python2_7 -python2_6" PYTHON_TARGETS="python2_7
> -python2_6" 1,162 kB
You need it for the device-mapper stuff. That might also listen to the above
setting in /etc/lvm/lvm.conf.
Can you try setting the above one to " 0" and re-test?
I don't have any machine with mdev to test myself.
Also, the following page seems to indicate cryptsetup, LVM and mdev do work
together:
http://jootamam.net/howto-basic-cryptsetup.htm
This works inside an initramfs and I don't see a reason why it can't work
outside of the initramfs.
--
Joost