If a hard drive develops a bad sector, should it be replaced?
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.
Solution 1:
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.
Solution 2:
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.
Solution 3:
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.