My disk has a few bad sectors and has already failed the SMART tests. It obviously is going down.
It gets remounted to read only and I have to fsck and reboot all over again. Is it safe for me to remove the
errors=remount-ro part from the fstab file?
Quick note: I assume when you say its "failed the SMART tests", you mean that it has one or more pre-fail attributes failing now. Not that a long self-test failed. If its just back blocks, then you just need to get them remapped, and your problem is solved—even without a new disk. (But still have backups!)
Is it safe? Well, define safe... I mean, you're continuing to use a disk that (via SMART failure) is telling you it expects severe data loss within the next day.
errors=remount-ro is intended to prevent potential bad outcomes of attempting to continue full use of a corrupted filesystem:
- You could get kernel panics. Relatively safe (well, you may lose work in progress when the system panics).
- You could get massive filesystem corruption. This is the real big one; you could lose a lot of files when e.g., the kernel loses track of the inode backing
/home. Or when you get two files "sharing" the same sectors. Fsck should "fix" this regardless, but you may wind up with a good part of your filesystem sitting around in lost+found, and many of the files corrupted from overlapping sectors.
I hope you already have a backup. I hope you've tested that backup.
When my root HDD get damaged, the indicator just kept blinking, and the system stuck,
A temporary solution is try to fill the damaged cell blocks, first find all bad blocks with
badblocks, then use
hdparm to tell the HDD stop using that block.
But that would cost a great time, I don't it worth it.