[dm-crypt] Spontaneous Unmounting - LUKS Device Busy

Frederick Gotham <[email protected]> Tue, 2 Mar 2021 14:36:03 +0100
Newsgroups de.saout.dm-crypt
Message-ID <trinity-b3d0d2d3-5388-4d34-83a0-718db6e5f916-1614692163185@3c-app-mailcom-bs10>
Hi everyone,

I have an SDcard with one partition on it: /dev/mmcblk0p1

This partition is a LUKS volume, so I open it and give it the name 'z', and so I now have the node: /dev/mapper/z

I then mount /dev/mapper/z to the directory /mnt/sdcard

When doing testing on the SDcard, reading and writing data in a predeterimined elaborate pattern, the device "/dev/mapper/z" mysteriously becomes unmounted and this happens predicatably at the same point in the test every time. I don't know what's causing the unmounting. Next if I try to close the LUKS volume (either by using cryptsetup or dmsetup remove --force), it says Device Busy and it won't close (even though it's not mounted).

Is there any way I can turn on verbose logging for LUKS to try figure out why the volume is being spontaneously unmounted? I was thinking that maybe the intense testing is causing a spike in CPU / RAM usage which might cause an internal 'ioctl' command within the kernel to fail with error code EAGAIN (Temporary Unavailable). I haven't been able to confirm this yet.

With regard to the testing procedure I mentioned above, well I've done the same tests on an unencrypted SDcard, and they all work fine. I only get the spontaneous unmounting with a LUKS volume.

I had considered that the device "/dev/mmcblk0p1" might be disappearing and that this might invoke the UDEV script "media-automount" to unmount the volume, however I haven't been able to confirm yet if this is happening -- I'm waiting for people to get back to me on that.

For the time being I need to see verbose logging from LUKS to see if there's an error happening somewhere.

Frederick

_______________________________________________
dm-crypt mailing list
[email protected]
https://www.saout.de/mailman/listinfo/dm-crypt