can I quarantine bad sectors on HD?
My hard drive has some bad sectors, and they obviously are affecting system performance: I haven't found any of my valued personal files to be corrupted or lost, but the distro installation can't shut down properly and reinstallation doesn't solve the problem. (Can't believe it took me at least a week to realize the bad sectors were the likely reason.) Is there any way to isolate the bad sectors and make sure the drive never uses them? (No, I can't run out and buy a new hard drive.)
|
Hi
You could use fsck.ext2/3/4 with -c twice. I think you'll need to use a live CD so it can be run while unmounted. And it will take a long time if the disk is big. Quote:
|
Quote:
|
Not sure about this, but if a critical OS file uses a bad block, it will most likely crash anyway because the file is corrupt, or it can simply not be read.
The mkfs.ext4 command also has this option, so if you ever have to reinstall, that option should at least prevent the bad blocks from being used in the future. |
You may be able to mark bad sectors to not being used, but this will not solve your problem. When your OS is already affected by bad sectors that means that the disk is already out of spare sectors to replace bad blocks. This means your disk is dying and even if you can mark the current number of bad sectors as unusable they will become more and more over time, possibly rendering your OS unusable.
I know that you don't want to hear that, but there is no reliable way to bring this disk to a state that you can safely use it again. The disk has to be replaced, but in the meantime you can try to not use the the parts of the disk where the most bad sectors appear with just leaving them unpartitioned. Use the disk as rarely as possible (mount /tmp to RAM, use another disk or Flash drive for /home, ...). Don't trust it at all with important data. |
No, I don't mind hearing it. Thank you. I'm not sure offhand how big the hole is (I think around 145 bad sectors, but out of what total, I don't remember), but should I start checking every one of my data files to see if anything's been lost? Only the operating system is obviously affected. Also, is it pointless to back the hard drive up (because I could be backing up many corrupted files)?
|
Quote:
Quote:
|
--edit-- given your last post it seems like this won't help you, but it might be relevant for someone else --edit--
How do you know there are bad sectors? if there's a nagging "I/O error bad-sector blah blah" on your command line it could be that your kernel is being retarded and is trying to read from a device that isn't there. Happened to me more than once. Make sure the error message relates to an actual physical drive. |
I'd get the OEM's drive diags. They tend to offer a feature that tests drives fully with write reads in some cases. The result would be what some collection of all the computer parts would know. For example. You could have a bad drive controller and a great drive and make it seem like there are issues with the drive.
|
All times are GMT -5. The time now is 02:45 PM. |