5

About six months ago I installed Ubuntu 14.04 on my laptop with full disk encryption (FDE).

Now I am considering turning off FDE because I think the feature is making my system unstable. The risk of data theft seems less likely than the risk of system failure.

From the following, does it sound like FDE is likely at fault? Or should I be looking at the disk itself?

The disk is an Intel SSD. hdparm reports a model number "INTEL SSDSC2BW240A3".

To reduce disk writes I have put /tmp on tmpfs and removed set the noatime attribute for the rest of the disk. All other filesystem settings are the default, I believe.

At boot about a month ago the computer refused my decryption password. It acted as if it was the wrong password. Quite stressful!

I booted from the live CD and managed to decrypt the disk by giving the same password to the file manager prompt. The files were all still there, phew!

At the next boot from disk, the FDE system accepted the same password. Strange!

Now several times a week I encounter I/O errors make the system unusable and cause me to lose unsaved work.

Without warning, any and all of the following can happen:

Menu icons appear as white pages with red X marks.

LibreOffice will freeze when I try to save some changes to a document. It is stuck until force it to quit and lose the changes. Then it doesn't start again.

pgAdmin will display two errors every time I execute a query: "Can't write to log file" and "Can't write to history file".

If the query tries to read any data not already cached in memory by PostgreSQL, the server responds with a "read-only file system" error.

Firefox works for a bit, presumably because it's caching responses in memory. Without warning it will disappear.

Most basic of all, I can't even cleanly shutdown the system.

When I open a terminal and run shutdown, I see something like "/sbin/shutdown exec: I/O error"

I would supply more accurate repros, but it's quite hard to capture them when the system enters this state.

The only way out is to hold the power button until the system turns off hard.

When I turn it on again, the FDE system appears to do a quick consistency check after it accepts my password. I've been lucky so far.

EDIT:

I've taken a backup of all the important things.

I followed Fabby's instructions to test the disk using smartmontools.

Here is a link to the pre-test output: http://paste.ubuntu.com/9925956/

Here is a link to the post-test output: http://paste.ubuntu.com/9926195/

  • Could you please attach some logs,kmsg especially. – XperianX Jan 09 '15 at 22:32
  • @XperianX how do I retrieve the kmsg log? I found an empty file called /proc/kmsg. I read on Super User that you can use dmesg to read the kernel log, but dmesg | grep kmsg returns nothing. – Iain Samuel McLean Elder Jan 09 '15 at 23:18
  • Check /var/log/ there you should find files like kern.log and others it would be the best if you upload whole folder. – XperianX Jan 10 '15 at 09:25
  • As a safety measure, check your ram with memtest86+. I know nothing about FDE, but I don't see why it could be the culprit here. – solsTiCe Jan 10 '15 at 22:59
  • Your disk reports that a SMART Self-test Log not supported so both tests were identical. There is one very worrying parameter (the others are warnings) and that is the End-to-End_Error parameter: 90 out of a maximum of 100 so the advice is: Buy a new hard drive, read this Q&A and re-install on the new hard drive according to your user type... – Fabby Jan 29 '15 at 09:56

2 Answers2

3

My apologies for posting this as an answer, but comments would not get the attention this needs. It is my considered opinion, that your drive is in imminent danger of failing.

Please make a full system backup right now.

If you don't know how to make a system backup, please refer to this question. You're user type 4. If you need any further help on making a system backup, leave a comment below this answer.

What??? You're still here? Go away and make the system back-up first! (Disk-to-image)

Then, boot from a LiveCD and issue the following command:

sudo apt-get install smartmontools

Then:

sudo smartctl --scan

and for all /dev/?d? lines below that:

sudo smartctl --info /dev/?d? 

until you see: Device Model: INTEL SSDSC2BW240A3 and verify that:

SMART support is: Available - device has SMART capability.
SMART support is: Enabled

and from now on, wherever you see sda, replace that with your own ?d? (sda is the most common, so yours will probably be this too)

Run:

sudo smartctl --all /dev/sda

and post the output of that to http://paste.ubuntu.com and provide a link to the ouput back here. Then:

sudo smartctl --test=short /dev/sda

and post the output of that (by doing another sudo smartctl --all /dev/sda) to http://paste.ubuntu.com too and provide that link to its output back here too.

Hopefully I'm wrong

and I can delete this answer safely and we can get back to encryption.
Fabby
  • 34,259
  • 1
    You could get a number of errors if it were the encryption, but I/O isn't one of them. I agree with you that a backup needs to be performed immediately, prior to working through anything else. – Geary Shull Jan 14 '15 at 13:35
  • This is the very first time that I'm sad to see that I get a bounty, as I fear that Iain's computer must have died before he was able to take that back-up... – Fabby Jan 17 '15 at 11:13
  • 1
    It's not dead! I managed to take a backup tonight. I would have done sooner, but I submitted my dissertation two weeks ago so was catching up with life outside the computer. I have edited my question to include links to the pre-test and post-test output of smartctl. I'm not sure what to make of it, though. Can you interpret it? – Iain Samuel McLean Elder Jan 28 '15 at 23:52
  • @IainElder: If this answer helped you, don't forget to click the grey at the left of this text, which means Yes, this answer is valid! ;-) – Fabby Aug 29 '15 at 21:47
  • Sorry, @fabby, in the end i installed windows 10. I've had no IO issues since then. I think we should just close the question. – Iain Samuel McLean Elder Aug 31 '15 at 17:50
2

(Assuming FDE is Ubuntu disk encryption, since INTEL SSDSC2BW240A3 has build-in encryption feature.)

Looks like common SSD behavior with Ubuntu, not FDE connected.

Common current FDEs, including cryptsetupt/LUKS which is default Ubuntu disk encryption mechanism, use transparent approach (don't add additional writes) and so harmless to SSD.

But installation of Ubuntu to SSD still could be very tricky and doesn't end with moving /tmp to tmpfs (not really recommended now) and disabling atime (/var/tmp/, ~/.cache/, various local tmp/, specific application settings, partitioning SSD leaving at least 10% unused, etc.). As a good start this two article could be used:

For current case it makes sense to check SSD's health (eg. via SMART). More details about:

dess
  • 692