chimera-linux / dinit-chimera

Chimera service package for dinit
BSD 2-Clause "Simplified" License
14 stars 7 forks source link

Shutdown hangs on "stopping remainging crypto disks" #5

Closed ghost closed 1 year ago

ghost commented 1 year ago

I have two drives in an x86_64 pc, both encrypted with luks2. One is my root, and the other is a second drive mounted on /mnt/extra mounted through fstab, and decrypted with a keyfile specified in crypttab.

Whenever I reboot or shutdown, my pc hangs on "stopping remainging crypto disks". However, if I ummount and luksClose the drive mounted on /mnt/extra, my pc shutsdown properly.

q66 commented 1 year ago

what if you only umount?

ghost commented 1 year ago

If I only issue umount and don't close the drive, it also hangs at "stopping remainging crypto disks"

q66 commented 1 year ago

is there any LVM or something else on the LUKS? or just a basic filesystem?

ghost commented 1 year ago

There are no LVM's, just a btrfs filesystem mounted as a subvolume with the name @ extra

q66 commented 1 year ago

can you test modifying /usr/lib/cryptsetup/cryptdisks-functions by commenting out the dmsetup mknodes in do_stop?

q66 commented 1 year ago

there is also this patch that i want you to try https://github.com/chimera-linux/dinit-chimera/commit/ed94cacc386c341aa4edb7954496b336d42c02e3 (without dmsetup mknodes commented out)

ghost commented 1 year ago

Commenting out dmsetup mknodes in do_stop doesn't stop shutdown from hanging, but https://github.com/chimera-linux/dinit-chimera/commit/ed94cacc386c341aa4edb7954496b336d42c02e3 does stop shutdown from hanging.

q66 commented 1 year ago

alright, fixed then

I'll pull it into packages