Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My SATA HDD (Hitachi DeskStar 7K160) seems to have 1 bad sector. Is it possible to try to fix it? I checked Hitachi's drive tools and all of them are diagnostic tools, so I don't know how much help they will be.

I can buy a new drive but first I really want to try to fix it since I don't want the hassle to setup Windows 7 & Ubuntu again (both are on this disk).

hdBadSector

share|improve this question
1  
Hitachi's drive utilities can repair fixable errors as well as being 'diagnostic'. –  techie007 Sep 7 '11 at 5:15
    
In an edge case (context below) it may be preferable to attempt recovery before reallocation. –  Graham Perrin Apr 1 '13 at 18:29
add comment

4 Answers

up vote 3 down vote accepted

If it is formatted as NTFS you can try using chkdsk /r to repair the drive, but I'm not sure how much that will help you in the long run. If the drive is failing, this could be an early warning sign. Backup everything you want. I suggest using dd to avoid having to manually copy everything over.

share|improve this answer
    
one little question about dd : will it also copy the boot sector? since i am using GRUB. –  sterz Sep 6 '11 at 20:23
    
It is a raw copy so I'd image it does, but I'm no dd expert. Others may be able to elaborate more, but dd is pretty well known so I'm sure it wouldn't be hard to find a good guide. –  sbtkd85 Sep 6 '11 at 20:34
add comment

Presuming you haven't yet lost any data, buy the new disk and clone across to it. Then you don't have to deal with setup again. You can connect the new disk and use dd from Ubuntu to clone it. There are multiple sites covering the process. As for recovering the sector, there are programs that claim they can, and some people claim to have good luck with them, I personally did not.

share|improve this answer
add comment

Your report is indicating you have one bad sector. This is not an emergency situation. Occasionally a disk can develope a bad sector for all sorts of reasons, and this is why disks come with a spare pool that automatically remaps the bad sector. This is what has happened with your disk.

Unfortunately the data on that sector is lost. To put this in perspective, depending on the sector size, in all liklihood you're talking about 4k of data, which could easily be some temp file that was created.

There are tools like spinrite that can sometimes retrieve data from drives that are failing by trying to read the sector repeatedly, but for one sector it's not worth the trouble unless you were to determine this was a vital data file.

The important thing is that you have backups of all of your important data files, and that you keep an eye on the drive. If you start to get additional problem sectors, then you should consider the advice provided by the other respondents, about getting a replacement.

share|improve this answer
1  
This. There is no reason to panic. Generally speaking, a single harddisk will always fail at some point, so you should have a procedure in place for handling this (if the system is critical, RAID; in any case, backups). –  Simon Richter Sep 7 '11 at 1:18
    
@SimonRichter +1 and for a mission-critical system I'd recommend a suitably configured ZFS pool (if the OS can support it). –  Graham Perrin Apr 1 '13 at 18:27
add comment

Generally bad sectors are signs of physical damage to the drive and are unfixable, some file systems will allow you work round them but mostly they cannot be repaired. Sometimes the damage is localised but often they are indicators of more trouble to come, so if you plan to continue to use the drive take frequent backups.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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