[pkg-cryptsetup-devel] cryptdisks stopper hanging on shutdown for LVM VG
Thorsten Glaser
t.glaser at qvest-digital.com
Fri May 17 00:23:13 BST 2024
Hi,
I’ve got a situation where I added a partition, luksFormat’ted
it, made it a PV, created a new VG with it, created an LV on
that and put a filesystem onto it.
On boot, it all works nicely, and the LUKS is opened by the
keyfile on the (encrypted, unlocked with password) root fs.
On shutdown, however, after the fs has been umounted by
K06umountfs, the K07cryptdisks and K08cryptdisks-early run
and try to stop the LUKS, which cannot work because the LVM
is still open on it. It throws a number of “failed” while
stalling, and then a couple more messages very rapidly before
powering off.
(On the next boot, my root filesystem had errors from e2fsck,
so the shutdown may have not been clean.)
Notably, there is K01lvm2-lvmpolld but /etc/init.d/lvm2 has
no K script (which matches…
# Default-Start: S
# Default-Stop:
from the LSB header) even on bullseye, which this is.
So, my question here is, which is the expected behaviour,
let the LUKS simply open, or close everything up to and
including the LUKS? And then, how do we make that happen.
Right now, the stack doesn’t seem to agree on what to do.
(Classically, e.g. on BSD, I’d just leave the crypto device
open, I *think* this can only cause trouble if it’s backed
by a loopback file on some other filesystem to be umounted.)
Incidentally, the cryptdisks scripts have lvm2 in Should-Stop
and X-Stop-After, respectively, so perhaps in the past lvm2
did stop unused LVs, VGs and PVs on shutdown?
bye,
//mirabilos
--
Infrastrukturexperte • Qvest Digital AG
Am Dickobskreuz 10, D-53121 Bonn • https://www.qvest-digital.com/
Telephon +49 228 54881-393 • Fax: +49 228 54881-235
HRB AG Bonn 18196 • USt-ID (VAT): DE274355441
Vorstand: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg
Vorsitzender Aufsichtsrat: Peter Nöthen
More information about the pkg-cryptsetup-devel
mailing list