Best tools to check hard drive health?

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

frogtech

Well-Known Member
Jan 4, 2016
1,482
272
83
35
1. I'm mainly interested in 'immediate' functional health, as in, the drive isn't already almost dead, and still reports clean across the board.
1a. Badblocks seems like a good program to perform a functional test, do I need anything else?
1b. If I don't want to run Badblocks on 25 disks can I use SMART data as an indicator of anything and what would the relevant values be?

2. For programs like Badblocks and other programs that look at SMART data, is it okay if the disk is configured as an individual raid 0 or do these things only work with passthrough storage modes? I think the only way I have right now to hook them up is via the Dell VRTX Shared PERC8 which is a raid adapter.
 

rootgremlin

Member
Jun 9, 2016
42
14
8
my goto procedure for checking if a hard disk / ssd is ok or soon going to die is smartctl (aka smartmontools)
there a smartctl -a /dev/yourdiskdevice will tell you 2 important values:
realocated sector count (already defective sectors that the drive remapped to internal reserved area) and
current pending sectors (sectors the drive could not reliably read / usually fixed by writing to that sector)
The disk ist usually ok if both are zero.
If either have non zero value, it depends. When theiy grow over a short time, it is an indicator that the disk is going to die real soon.

instead of running badblocks, you could simply make the drive check itself by running
smartctl --test=long /dev/yourdiskdrive
when this completes without error the drive-surface / every sector is ok.
The long test usually tries to read every sector and writes a message about the first sector it could not read in the drive error-log
In this state the current pending sector counter increases by one.
Then you could try to "revive" it by writing to it. If that works, all is ok and the current pending sector counter gets reset to 0.
It it does not work, that sector gets remapped to a spare area on the disk and the realocated sector count increases by one.

smartctl could directly talk to disks behind some controllers (USB-Bridges, Raid-Controllers) It has a commandline option to specify the kind of conroller.
As most hardware-raid controllers present only one disk-device to the operating system, smartctl must have a way of talking to the individual disk.
I only know that this works for HP P4xx controllers.
 
  • Like
Reactions: frogtech