2

I am using an encrypted hard disk for backing up my (also encrypted) laptop disk, running Ubuntu 15.10 64 bit. The built-in laptop disk works fine but the external USB disk, after working for somewhere between a few minutes and a few hours, suddenly switches itself back to being encrypted and shows the password prompt. This happens even though I keep choosing "remember forever". Often, when I then re-enter the password, either it does not work and the dialog is shown again, or the system claims that it cannot mount the drive because it is already mounted.

I thought maybe this is the problem with the physical disk and I attached a second encryped external usb drive. Now I am seeing the same problems for both disks, of completely different make and model. Although I have seen this problem with 15.04 my impression is that is has become even worse.

The bottom line is that now both my external USB hard-disks are essentially unusable and the whole situation is extremely annoying.

Is this a known issue, and more importanly, is there anything that can be done to fix or avoid these problems?

The error message when trying to unlock again and the system claims something is already mounted is:

Error unlocking /dev/sdd1: Command-line `cryptsetup luksOpen "/dev/sdd1" "luks-xxxxxx-xxx-xxx-xxx-xxxxxxxxxx" ' exited with non-zero exit status 5: Device luks-xxxxxx-xxx-xxx-xxx-xxxxxxxxxx already exists. (udisks-error-quark, 0)

jpp1
  • 1,081
  • USB -> bad cable or plugs? What's giving the error, a popup on Ubuntu Unity? Are there more messages in dmesg or /var/log/syslog? – Xen2050 Apr 08 '16 at 16:29
  • As I said, I see exactly the same problem with two completely different external USB harddisks, using different cables, different plugs on the laptop so I think hardware issues can be ruled out here? The error is shown ina small popup dialog box. I will try to collect some log information and add it to the original question. – jpp1 Apr 09 '16 at 12:30
  • Internal damage to the laptop's USB is still possible. Definitely see the logs when the error occurs, I'm suspecting read errors or something. OT: I saw a very thin laptop that would intermittently disconnect & reconnect it's speakers whenever it was moved, apparently not strong enough to support itself & flexed some connection open & closed. – Xen2050 Apr 09 '16 at 15:08
  • Here is the log with all entries after a successful mount of the decrypted partition: http://pastebin.com/iHUx08hR This is from one laptop and one disk, I will try more combinations of disks and computers and cables. My suspicion is that there is some bug with handling what would otherwise be harmless intermittent problems in case of luks partitions. This makes using my portable disks unusable really, is there a way to un-encrypt those disks? – jpp1 Apr 10 '16 at 10:31
  • The first thing I noticed was "mce: [Hardware Error]: Machine check events logged", so that's not a good sign. Try this Q to see what the error is, some special package or program should be able to find/read the error http://askubuntu.com/questions/605369/mce-hardware-error-machine-check-events-logged-appears-in-syslog-what-sho (I read somewhere that it may only read the errors once, so make sure to record any. And may have to install the program first before it starts recording them...?) – Xen2050 Apr 10 '16 at 22:52
  • Also right after the mce, there's "usb 2-3: USB disconnect, device number 30" and a bunch of I/O errors, with occasional "Cleaning up LUKS device /dev/dm-3 (backing device 8:17 no longer exist)" So it sounds like the USB drive (if the LUKS drive is/was "usb 2-3") is getting disconnected somehow. Maybe related to the mce error...? --- Safest way to "de-crypt" LUKS would be to open & copy plain files somewhere else. I remember an in-place encryption changer, maybe decrypter, but if it got disconnected while running that, very bad – Xen2050 Apr 10 '16 at 23:05

1 Answers1

-1

Thank you everyone who gave feedback! I tried the disks on different laptops now and they work fine here. So it appears that there is something wrong with the laptop I had been using, where after some random time the connection gets interrupted, irrespective of which USB plug I use.

jpp1
  • 1,081