systemd and dmcrypt/luks question

Eric Smith spacewar at gmail.com
Sat Mar 21 06:04:57 UTC 2015


I'm using a non-Fedora filesystem (zfsonlinux) which provides
appropriate services and a target for systemd. The services state:

    Requires=systemd-udev-settle.service
    After=systemd-udev-settle.service

This works fine for basic usage, but if trying to use zfs over
dmcrypt/LUKS, the mount service apparently runs before the LUKS
volumes are opened (based on /etc/crypttab). Also it appears that the
LUKS volumes are closed before the zfs file systems are unmounted at
shutdown.

I tried adding:

    Wants=cryptsetup.target
    After=cryptsetup.target

to the [Unit] section of the zfs services, but that didn't seem to
help. Can anyone offer advice on how to properly represent the
necessary dependencies?  Ideally it should be done in a way that still
works if the system has no encrypted block devices.

If a suitable solution can be found, I'll be happy to send it upstream
to the zfsonlinux developers. Presumably this would be useful for use
of any other out-of-tree filesystems over dmcrypt.

Thanks!
Eric


More information about the devel mailing list