4 ms·
bad blocks on harddisks are also often remapped when written to. However in my (limited) experience once you get badblocks the disk detoriates often. So this ba
by nisa 6y ago
bad blocks on harddisks are also often remapped when written to. However in my (limited) experience once you get badblocks the disk detoriates often. So this badblocks feature is probably not as useful because the harddisk firmware is the only place that knows about badblocks and "lies" to you.
However for deciding if an old disk is still usable I've found that overwriting the whole disks multiple times with the badblocks utility (https://linux.die.net/man/8/badblocks https://linux.die.net/man/8/badblocks) - if the disk passes multiple runs without generating new bad blocks it's often still usable
- magicalhippo 6y ago> However in my (limited) experience once you get badblocks the disk detoriates often. This used to be my experience as well. However I've had a couple of WD Reds that developed a few (~20) bad sectors, one two years ago the other three. Both have been stable since, and I run periodic scrubs on them. When the first one happened I had planned to swap it out, but was a bit low on cash right then so waited a bit. Then I saw it didn't deteriorate further so I go curious and decided to wait. Still waiting.
- marcan_42 6y agoGenerally, a small handful of bad blocks (and they come in groups due to the physical format and sector size emulation) aren't an indicator of imminent trouble. If they can be written to properly, then that could just be random data corruption caused by e.g. an unlucky hard shutdown, vibration, or other random thing. If they can't be written to, it could just be very minor drive damage or a weak area of the platter (and in this case, the drive will remap them and increase the bad block count in the SMART data) Now if you start getting into the hundreds, then yeah, the drive is dying.
- londons_explore 6y agoLots of drives don't seem to measure their own power supply... That means if you run them on a laptop with a slightly out of spec power supply, you can get the drive marking hundreds of bad sectors, yet when you put them in another machine they're fine again. If you're designing something as complex as a drive, you would have thought they'd have a bit of electronics to test the power supply and refuse to work (with some relevant error code) if it's out of spec.
- jwilk 6y agolinux.die.net man pages tend to be badly outdated. And you can't easily tell this is the case, because because they strip version information. For example, this one doesn't document the -B option, which was added in 2011(!): https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/commit/?id=e53e8fb00970fc74 https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/commit/... Better man page link: https://man7.org/linux/man-pages/man8/badblocks.8.html https://man7.org/linux/man-pages/man8/badblocks.8.html
- teddyh 6y agoIf you use Debian, I would suggest https://manpages.debian.org/stable/e2fsprogs/badblocks.8.en.html https://manpages.debian.org/stable/e2fsprogs/badblocks.8.en.... (where you can replace “stable” with whatever designator you like.)
- hoseja 6y agoFeels like handling OOM; an abstraction breakdown you think you can cleverly work around but is actually not easily handled at all.