systemd and dmcrypt/luks question

Eric Smith spacewar at
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:


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

I tried adding:

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.


More information about the devel mailing list