[pkg-cryptsetup-devel] cryptdisks stopper hanging on shutdown for LVM VG

Mason Loring Bliss mason at blisses.org
Thu Jun 6 04:05:06 BST 2024


On Fri, May 17, 2024 at 01:23:13AM +0200, Thorsten Glaser wrote:

> 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.

I see long hangs on ZFS, and have for at least a few years now. With ZFS,
it's all going to be consistent on reboot, so I amend my
/lib/cryptsetup/cryptdisks-functions to say, simply:

_do_stop_callback() {
    local i rv=0 skip="y"

It might be cleaner still if that referenced an external configuration.

That said, I don't use LVM much lately. I wonder if it'd be possible to add
something in that same function to pull down the logical volume. Or better,
I wonder if having an appropriately-placed stop script would work. Which I
see you address, below:


> 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?

That sounds like useful behaviour.

-- 
Mason Loring Bliss          mason at blisses.org          Ewige Blumenkraft!
awake ? sleep : random() & 2 ? dream : sleep; -- Hamlet, Act III, Scene I
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-cryptsetup-devel/attachments/20240605/9571a72c/attachment.sig>


More information about the pkg-cryptsetup-devel mailing list