7

I recently encountered an I/O error reading a file on my hard drive. Examination of the SMART data shows that the drive has one bad sector (the Current_Pending_Sector count is 1). The file was created recently (a few hours ago), so this failure must be pretty fresh.

One option is to immediately replace the drive. Another is to simply recover the unreadable file from backups; rewriting the sector will cause it to be remapped to a different physical sector. This would save the expense and hassle of replacing the drive. But if the bad sector suggests that further failure is likely to happen soon, then this only postpones the inevitable.

Is the appearance of a single bad sector evidence that the drive is failing and needs to be replaced?

Put another way, imagine that I have two identical hard drives. Drive A has 0 bad sectors. Drive B has just developed 1 bad sector. Is Drive B significantly more likely than Drive A to develop further bad sectors, or fail in some other serious way, in the near future?

If possible, I would like to see answers supported by large-scale data or statistics, rather than opinion or anecdote. There is a lot of pseudoscience and misinformation out there regarding hard drive failure, so I want to be sure to base my decision on facts.

My understanding is that a "bad sector" means that a particular sector on the disk either cannot be read by the hardware in a sensible way, or contains data which does not match the checksum stored on the drive. So for whatever reason, the sector effectively no longer contains the data that was originally written there. I can imagine a number of possible causes for such a failure; some of them suggest that the failure is likely to progress, and others do not. Maybe a cosmic ray has flipped some bits in that sector; in that case, the failure was entirely random, and there's no reason to think that this drive is more likely to experience further failures than a new drive would be. Or maybe there's a tiny worm chewing through the magnetic domains on the disk; it has just eaten one sector and will now go on to eat some more, so more data loss is imminent. :-) In practice, is one scenario far more prevalent than the other?

If it's relevant, the drive in question is a 650 GB 2.5" SATA magnetic drive, sold by Samsung, and is about 5 years old. The file containing the bad sector was created less than 1 day ago. The operating system is Ubuntu 14.04. All important data is backed up, so a drive failure would just mean buying a new drive on short notice, downtime to replace the drive, and perhaps loss of some very recent data. The system is a home server, so downtime is inconvenient but not seriously costly.

3
  • Sry - didn't read the entire post, but I had seen hard disks which working fine with ~15% bad sectors. If it's only one - forget about it. Preventing the rotational HDD from bad sectors is some kind of hardly. The HDDs have native (hardware level) solution for bad sectors, but if they are too many it will fail. You can scan the entire disk with some software. – Ifch0o1 Oct 18 '15 at 18:54
  • In this situation you might consider using mdadm RAID1 or ZFS mirror with hdd's A and B while both drives are still usable. That way when one of them does fail it won't be as inconvenient. Just be sure to run regular scrubs of the array so that when a disk reports a read error, the raid controller can tell the disk what data it is supposed to have in that block and the hdd can remap the block if required. You might also check out the hdd study on smart stats on backblaze.com/blog/hard-drive-smart-stats – BeowulfNode42 Nov 13 '16 at 5:28
  • @BeowulfNode42: Regrettably this machine has only one drive bay, and no easy way to connect external SATA. – Nate Eldredge Nov 14 '16 at 0:47
6

With a single bad sector and considering the drive's age, I would be concerned; however, you say it won't be a big deal if it crashes and you are following a good backup strategy, so I feel like you are fine waiting for it to do its thing.

That may happen tomorrow or it may happen in 10 years. It may happen after developing more bad sectors or it may never happen. You mention cosmic rays--that's exactly the thing--it could have been anything that made the one sector go bad. Let the hard-drive and OS mark the sector as bad and keep on doing what you've been doing as far as backups. When you have the time and resources to replace the drive, do it, but I wouldn't worry about making it a priority.

3

I have faced this situation.In case of bad sectors after sometime you won't be able to copy data back from the disk which has bad sector.After sometime you will start facing slow down issues which will ultimately lead to crashing of the operating system.
In short just replace the drive and don't risk your data.

4
  • This doesn't really answer my question. I'm well aware of the consequences of bad sectors - reading the file results in a delay while the file is reread, and ultimately an I/O error. The present error is easily fixed by rewriting the file, as I mentioned. I understand that further errors would be a problem - I want to know how likely it is that they will actually occur. I'm willing to accept a certain level of risk, since as mentioned I have backups, but I want to quantify the risk I am actually taking on. – Nate Eldredge Oct 18 '15 at 19:05
  • As bad sectors are the sign of failing of your hdd,they will keep on increasing(I tried to use mine as external after replacement but failed miserably). – does_it_matter Oct 19 '15 at 3:53
  • "I want to know how likely it is that they will actually occur." - Very likely. It could be a day from now or a year from now. A HDD only has a certain number of spare sectors when those run out you will start to permanently lose data. – Ramhound Oct 19 '15 at 11:04
  • Actually it depends on the usage of the hdd,if you keep on using the hdd heavily(what I did I keep on re-installing windows whenever it fails to load and it didn't take more than a month)I don't think it will take more than a month.The problem with windows file system is that it doesn't store data continuously so lets say if you have a bad sector at a particular location windows will encounter it again and again as you keep on writing and reading data from the hdd which will result in slow downs and at last crash. – does_it_matter Oct 19 '15 at 15:05
1

I would suggest keeping an eye on the bad sector count. If it remains the same for an extended period, say a month, then you're fine; the defect was probably a manufacturing issue or some other random event. However, if your bad sector count continues to grow, you definitely have problems and need to replace the drive.

Edit: Updating my answer to say that the questionable drive should be checked daily. If after a month there are no new bad sectors, then the drive is almost certainly fine, but if you see new ones every day, then the drive needs to be replaced ASAP. You also need to make sure the drive or computer is on a solid surface that isn't easily jostled.

1
  • This is reasonable advice (and should not have been downvoted IMO), unless you're paranoid. If this is an external drive or in a laptop, then it's less likely to be a manufacturing defect, and possibly the result of shock/vibration. – sawdust Oct 18 '15 at 21:57
1

Eventually

However drives are designed to be resilient to bad sectors, and many drives keep running for a while with bad sectors. Your drive has spare sectors to handle these as they come along, and you need to look at the big picture when deciding to replace your drive.

I'm guessing you're looking at smart data and syslog. There's specific errors in the latter - that would indicate what exactly is wrong and would be helpful here. Look for drive related correctable errors (which are slightly scary but not so much) and uncorrectable ones (which are a sign of impending doom). I can't remember the errors off the top of my head.

The fact that its a pending sector count is worrying. The sector should be replaced posthaste. I'd also look at "Uncorrectable Sector Count"and anything else that's pink here on the wikipedia page on smart attributes. There's also a smart attribute that shows the grown number of bad sectors. Lower the better there, but its a sign of gradual failure rather than dropping dead.

There's a few danger signs here

  1. Sectors arn't being replaced yet. Granted its a VERY low number and you should be alright for a while

  2. The drive is 5 years old. Its on the tailend of a longer warranty cycle/typical computer design life cycle.

There's a few things that are reassuring. You know the drive might die at any time and have backed up and are prepared for data loss. I wouldn't say run out and buy a drive now, but it would be prudent to plan for a replacement drive soon. You can always use the old drive for transient data till it dies.

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.