So I'm back on systemd now, mainly because I really like volatile system logs with journald.

Following the article in the Gentoo Wiki, things went mostly smooth - much better than with my first attempt during installation. However, there were two little pitfalls concerning the LUKS volume my rootfs resides on.

Here's my partitioning layout:

sdb                 8:16   0 119,2G  0 disk
├─sdb1              8:17   0   512M  0 part  /boot
└─sdb2              8:18   0 118,8G  0 part
  └─luksroot      254:0    0 118,8G  0 crypt
    ├─m4vg0-swap  254:1    0   512M  0 lvm   [SWAP]
    ├─m4vg0-root  254:2    0    30G  0 lvm   /
    └─m4vg0-home  254:3    0  88,2G  0 lvm   /home

In order to get the LVM PV unlocked, I originally had the following in my kernel cmdline passed to dracut:

(...) crypt_root=UUID=2a153448-c20e-46ea-a5f9-148fcb71a907 root_trim=yes rootfstype=ext4 (...)

With systemd inside the initramfs generated by dracut the syntax is a bit different. I initially changed it to

(...) rd.luks.uuid=2a153448-c20e-46ea-a5f9-148fcb71a907 rd.luks.allow-discards rootfstype=ext4 (...)

and this basically worked but disabled TRIM (see this bug) and yielded a warning:

dracut-initqueue[295]: Warning: Unit file of systemd-cryptsetup@luks\x2d2a153448\x2dc20e\x2d46ea\x2da5f9\x2d148fcb71a907.service changed on disk, 'systemctl daemon-reload' recommended.

The fix for both was to put an entry for the LUKS volume in /etc/crypttab and set the discard option there:

# /etc/crypttab

luksroot    UUID=2a153448-c20e-46ea-a5f9-148fcb71a907    none    discard

The corresponding entries from the kernel cmdline can then be omitted, as the crypttab is included in initramfs and automatically parsed.

Update 2015-05-25:

As Lennart Poetering says here, the often mentioned option rd.luks.allow-discards is currently not implemented and one should use rd.luks.options=discard instead.

This avoids the aforementioned entry in /etc/crypttab, when desired for all volumes.

Credits for this update go to Nils Freydank - thanks! :)

(updated on Mon 25 May 2015)