9

We have a cutting machine which is working with Linux. I don't know a lot about Linux, so I attach a photo of the error which we get. I will be happy if someone can help.enter image description here

6
  • 6
    The drive (sda) is dying and needs to be replaced. Don't run fsck anymore. Ask your IT if you have backups / spares for this drive. If not, you'll have to try your luck with ddrescue, or ask the manufacturer of this machine. Usually the firmware for such machines is proprietary so you can't just download a new one and make your own from scratch... Mar 7 at 9:58
  • 10
    ...also if that machine needs to be calibrated, and that calibration data is on disk, and its corrupted... there may be a risk of causing damage to the machine itself. there is a whole bunch of usb sticks in the picture, hopefully that means it reads production data off usb, and you have backups of those at least... I'm wildly guessing so I'll shut up now. All the best. Mar 7 at 10:26
  • 3
    Most likely the people saying the hard disk in the machine is dying are correct. However, if it's in a machine shop, or otherwise subject to vibration, it's conceivable that something has vibrated loose, and is making poor electrical contact. You might try shutting it off, opening up the case, and reseating (unplug and firmly replug) the power and data connectors to the hard drive (on both ends.) (If you're not familiar enough to be comfortable doing this yourself, definitely don't wing it, find someone who is.) Mar 8 at 3:58
  • 3
    Ultimately, we're still a bunch of unknown people from the Internet, and while the information we give (at least, that's true for high-rep users) is in good faith and at the best of our knowledge, we don't know enough about your workplace setup and environment to give an exact answer. So the best way of proceeding for you might be not to touch anything and escalate to the person responsible for the machine.
    – dr_
    Mar 8 at 8:49
  • 1
    @GlennWillen This sort of an error (unrecoverable read error) is reported directly by the drive, it's certainly not a communication issue (those look somewhat similar but the "Additional sense" message is different).
    – TooTea
    Mar 8 at 16:23

2 Answers 2

11

These errors on your picture are coming from the kernel and they indicate the kernel has not been able to read a data block (sector), and the attempts to reallocate it have failed (this is a standard feature of HDD drives):

 Descriptor sense data with sense descriptors (in hex):
         72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00 
         00 40 08 a0 
 sd 0:0:0:0: [sda]  Add. Sense: Unrecovered read error - auto reallocate failed
 sd 0:0:0:0: [sda] CDB: Read(10): 28 00 00 40 08 a0 00 00 08 00
 end_request: I/O error, dev sda, sector 4196512
 ata1: EH complete

This strongly suggests that your storage is dying/dead, thus e2fsck cannot complete the task.

If you really care about data, send the HDD to any company doing data restoration and ask them to image it. You could try to image it yourself (by using ddrescue) but it's not safe and may lead to data loss.


If you have backups and you need a quick fix, you can attempt to fix bad blocks yourself: https://www.smartmontools.org/wiki/BadBlockHowto

4
  • 6
    To the question author, in case you are not used to dealing with Unix experts, I would add that 'catastrophic' has its own particular usage in this field, and that you should not fear war, famine, or a plague of pestilence descending on your workshop 😉. Worst case, you will make the actual repair by an IT professional more expensive.
    – Hugh W
    Mar 7 at 20:15
  • 5
    Note that it's not the fsck status code that says that it's dying, it's the error messages before that. Those are strongly indicative of a hardware fault.
    – Mark
    Mar 7 at 22:17
  • 3
    @HughW Worst case, you will make the actual repair impossible (data loss). In this situation, there's unlikely to be irrecoverable data, but in general, you can break things hard enough that the entire world couldn't help you.
    – wizzwizz4
    Mar 8 at 10:16
  • Very true, although I will say I'm a bit skeptical that "not safe and may lead to data loss" is an appropriate representation of the risks involved. To be fair, I'm not an expert in data recovery so I don't know how the risks should really be characterized, but I do understand certain basic things about Linux system design and hardware and I can use ddrescue just fine. I know other people with similar backgrounds who have also done it. Are you really saying people like me aren't qualified to use this tool?
    – David Z
    Mar 9 at 3:48
3

The command fsck is used to check/fix the integrity of a filesystem. The command exiting with code 4 means that there are errors on the disk that fsck did not correct.

In short, it means the machine's hard disk (or storage) is damaged, perhaps physically. The best thing would be to contact the maintenance service of the cutting machine, or anyone that is responsible for such machine.

Note: one could try the command

fsck -yv /dev/sda

which forces a repair of the disk, while printing a verbose output. We don't know what your duties are so you'll have to see whether you want to try that, or leave the responsibility to someone above your pay grade.

2
  • 5
    "Unrecovered read error" probably means the disk is physically dying, so this is probably a stopgap at best. Mar 8 at 3:56
  • 8
    Don't ever run fsck on a dying disk. Just get the data off Mar 8 at 8:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .