On Thu, 16 Jul 2015 10:07:26 +0200 Avatar <avata...@gmail.com> wrote:
> Package: cryptsetup > Version: 2:1.6.6-5 > > > Description: > When shutting down Debian Stretch with full disk encryption, an error > message appears: > > Stopping remaining crypto disks > sda2_crypt (busy)... > > and the shutdown process hangs > > it is a crypto testing setup, with /var & /home on separate encrypted > partitions(no LVM), > with their keys stored on root partition. During shutdown > /lib/cryptsetup/cryptdisks.functions > does one pass on parsing crypttab and it's done. There seems to be an easier solution. On my LVM based system, the cause of the problem seems to be that LVM does not support proper deactivation of LV's. Hence the crypt device is still open. Adding a `dmsetup remove_all` to clean up the unused mappings fixes it: --- /lib/cryptsetup/cryptdisks.functions.orig 2015-12-31 13:05:11.436014636 +0100 +++ /lib/cryptsetup/cryptdisks.functions 2015-12-31 13:15:32.140005827 +0100 @@ -762,6 +762,7 @@ # Removes all mappings in crypttab do_stop () { + dmsetup remove_all local dst src key opts opencount major minor dmsetup mknodes -- It is upon moral qualities that a society is ultimately founded. All the prosperity and technological sophistication in the world is of no use without that foundation. -- Miss Matheson, The Diamond Age, Neil Stephenson