[dm-crypt] Failure to encrypt a big disk - missing kernel module?

Carlos E. R. robin.listas at telefonica.net
Sat Apr 15 14:22:20 CEST 2017

On 2017-04-15 09:51, Milan Broz wrote:
> On 04/15/2017 04:35 AM, Carlos E. R. wrote:
>> Maybe cryptsetup could detect mount status? :-?
> Actually it already tests device for exclusive access (it is not only mount,
> also for use in RAID, other device-mapper mappings etc), not sure why it
> was detected so late. Maybe that debug would reveal it ;-)
> Maybe it is racing with some automatic mount utility, dunno.

I think I tried twice. If not immediately, later.

> (The correct message should be "Cannot format device %s which is still in use."
> but apparently it was not failing during this step.)

Yes, that message would be very indicative :-)

As that partition is still unused I did an experiment. I formatted it
again as XFS, destroying the encryption, with gparted. Instantly it
appeared mounted in the desktop. I tried to apply a label to it and
failed, because it was mounted.

So I mount it, label it, and again instantly, the device is again
mounted on the desktop - this morning I can see the display.

I have now disabled this action in the XFCE desktop. Settings, removable
drives and media, Storage tab. Will not happen again - in this computer!
With my memory, I will forget the next time ;-)

So it is the desktop, not apparently systemd, and 'cryptsetup' could see
the situation before starting.

If you want me to run strace or something, I still can. I will probably
encrypt it this afternoon.

Cheers / Saludos,

		Carlos E. R.
		(from 42.2 x86_64 "Malachite" at Telcontar)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://www.saout.de/pipermail/dm-crypt/attachments/20170415/3a0c1782/attachment.asc>

More information about the dm-crypt mailing list