Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here's my situation: I have a server running Ubuntu Server 9.04

I copied a file on the server and was able to access the file from a Windows client computer without any problem.

Then recently I tried to access the file again and it won't load. The server console says things like : ata3.00: status: { DRDY ERR } ata3.00: status: { UNC }

If I try to copy the file (from a remote shell) it makes a truncated copy and reports an I/O error.

So I unmounted the volume, and ran fsck which didn't report any errors. However the symptoms above still exist. I thought fsck would correct the error (maybe deleting the corrupt file, doesn't matter).

Should I attempt to delete the file BEFORE running fsck ? Should I do something else? Is my HDD broken?


share|improve this question
Every time I've seen DRDY ERR it's been a hard drive failing. If you have space, try to make an image of it on another drive using something like ddrescue – ssmy Mar 14 '13 at 14:39

File system check programs deal with filesystem errors on the logical level. They can not influence mechanical errors on the physical level of the hard drive. The errors you see in dmesg indicate a "Media error".

In short, your filesystem is probably fine, but the drive is dying (it could be the motherboard, but it's less common that they break).

share|improve this answer
Thanks. But, the failure always occurs at the same place as far as I can tell. That makes me think that there's a "bad sector". Isn't there a way to "mark sectors as bad" and keep using the HDD ? Also, how can I tell if there are other "bad sectors" elsewhere on that drive? – Puzzled Mar 14 '13 at 16:36
man badblocks. look at the description of -o – Ярослав Рахматуллин Mar 14 '13 at 16:38

9.04 reached end of life and has been unsupported for years. You are just asking for trouble running a server on it today, so the first thing you need to do is backup your data, and reinstall the server with 12.04 LTS.

Your drive has a problem. After you backup, you should use smartctl -a /dev/sda from the smartmontools package to check for details. If it is only one or two pending bad sectors, writing to them can correct the problem. You can wipe the whole drive with sudo dd if=/dev/zero of=/dev/sda. If you don't get any errors from that, then the sectors will have either been reallocated, or just rewriting them went fine. You can see which with the SMART counts. If only a few or none were reallocated without error, then you can reformat the drive and install 12.04 LTS and restore your backup. If not, then it's time for a new drive.

share|improve this answer

You must log in to answer this question.

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