What happened;

  1. I started a badly written script to combine two binary files (via ssh), it needed more space than available in the RAM, presumably started using disk space as swap. My ssh connection dropped, cannot reconnect.

  2. Three days later I am physically in the same room as the computer, it is unresponsive, in the end I have to press the restart button.

  3. First restart the computer won't boot, gives many many of errors of the form; Failed to write entry (# items, ### bytes), ignoring: Read-Only file system.

  4. Pressed on and off again, computer starts normally this time. For a little while everything seems to be OK.

  5. Recently I can connect to the computer via ssh, but the disk has become read only, so most commands give Input/Output error (cannot write to tmp). For example ipython3 fails with FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/home/clumsycat'].

It's like when I restarted after the first problem part of the disk was still earmarked as swap? I will try a factory reset when I'm next in the same room as the computer, but do you think I have physically damaged the hard disk (ssd really)?

  • 1
    If you caused intense swapping and the SSD was an old model the SSD could have eventually worn out, but recent SSDs are more resistant to wear. The SSD looks damaged (see system logs(*) and/or SMART data), but it could be a coincidence (or an indirect cause, such as overheating). (*) assuming some of the errors could be logged before the drive with the logs becomes R/O). – xenoid Jan 6 at 13:04
  • @xenoid it's not 'that' old an ssd (3 years ish) but it has been used by a very bad programmer (me) for some time... so it may be older than it's years. – Clumsy cat Jan 6 at 14:32

It is common for SSDs to enter a read-only mode when the write endurance threshold has been reached. You should be able to check the drive with a tool from the manufacturer. If the drive is new or you suspect it is not old enough to have reached its write endurance threshold the manufacturer's tool may still shed some light on the problem.

| improve this answer | |
  • This seems likely, running any software tools is tricky because of the lack of tmp - but I guess I could do this from a bootable usb? – Clumsy cat Jan 6 at 14:17
  • Is the write endurance threshold shared between all partitions of the disk? Could I get more time out of it by switching my windows and linux partitions? – Clumsy cat Jan 6 at 15:23
  • 1
    As far as I know it is a whole disk state. You should be able to use a bootable USB or connect the disk to another PC/laptop with an external usb adapter. – monkadelicd Jan 6 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.