Menu

#58 Use badblocks to find slow drives

open
nobody
None
5
2012-11-28
2011-08-12
Anonymous
No

As it currently stands, badblocks is a useful diagnostic tool for finding hard drives with bad blocks, but there are other ways a drive can fail. Sometimes, the biggest sign of impending failure is large swaths of slow sectors. This patch adds the flag "-m" which will measure the time it takes to read a cluster of blocks. Any time over 150ms is reported. Additionally, the percentage bug has been fixed, and in verbose mode, average and current speeds are also reported.

This patch was inspired by MHDD and HDDScan. As I've not been able to find an equivalent utility that runs on either Linux or Mac OS X, I've modified this open-source utility to do something similar.

A few notes: This patch has been tested (at a computer repair center against various bad drives) against e2fsprogs version 1.41.12, and it's only been tested on Mac OS X versions 10.6 and 10.7. I did at least make sure that it compiles and runs against the latest git revision.

Discussion

  • Anonymous

    Anonymous - 2011-08-12

    Oh, and if the cluster size and block size have not been specified, the "-m" flag sets them to 255 and 512 respectively. These numbers match up with the sizes used by MHDD and therefore make direct comparison more easily possible.

    There's also code to ask the drive what size its blocks are, but so far, I've not found one that reports anything other than 512 (including drives that actually have 4kB sectors), so this portion may be a pointless endeavor.

     

    Last edit: Anonymous 2018-09-29
  • Anonymous

    Anonymous - 2011-08-12

    The following bugs have also been fixed in this patch:

    3387903
    3302092 & 3303044

     

    Last edit: Anonymous 2018-09-29