You are not logged in.
I have an external drive that's LVM on LUKS which is automounted using a key file. After upgrading systemd yesterday it errors:
× systemd-cryptsetup@diskname.service - Cryptography Setup for diskname
Loaded: loaded (/etc/crypttab; generated)
Active: failed (Result: exit-code) since Fri 2021-04-02 08:45:12 EDT; 1min 27s ago
Docs: man:crypttab(5)
man:systemd-cryptsetup-generator(8)
man:systemd-cryptsetup@.service(8)
Process: 647 ExecStart=/usr/lib/systemd/systemd-cryptsetup attach diskname /dev/disk/by-uuid/drive_blkid /home/username/.keydir/diskname.key1 luks (code=exited, status=1/FAILURE)
Main PID: 647 (code=exited, status=1/FAILURE)
CPU: 7ms
Apr 02 08:45:12 hostname systemd[1]: Starting Cryptography Setup for diskname...
Apr 02 08:45:12 hostname systemd[1]: systemd-cryptsetup@diskname.service: Main process exited, code=exited, status=1/FAILURE
Apr 02 08:45:12 hostname systemd[1]: systemd-cryptsetup@diskname.service: Failed with result 'exit-code'.
Apr 02 08:45:12 hostname systemd[1]: Failed to start Cryptography Setup for diskname.
After logging in, cryptsetup luksOpen /dev/sda$ mapper_name --key-file works and I can manually mount it. Also, systemd-cryptsetup@diskname.service status is active. I haven't tried downgrading.
Sidenote: after my update yesterday I had an empty /boot and a new /boot.bak dir. Rebooted from USB drive, arch-chroot into /mnt, and fixed. However, mkinitcpio -p linux would error due to a kernel error. Reinstalled linux in arch-chroot and that fixed the boot problem, not the systemd-cryptsetup error that still persists.
Offline
It seems there is currently a bug with systemd-248.1 with automatic decryption. Downgrading to 247.4-2 fixed the issue until the bug can be resolved.
Offline