1

1, 2... 4+ TiB of data makes a lot of (here choose the appropriate) work/recording/stress/time-to-eg-rebuild-the-array when put on an drive of unknown health.

When getting your hands on a spinning hard drive be it new or not, what points do you check on the hard drive (aka checklist) before you start filling it up with data... or send it back for replacement? By points I do mean points (not tools which are a matter of possibilities eg. OS, and preference, thanks @Franck Michael for pointing this).

Get the physical sector size (for partition alignment, filesystem or raid/lvm setup). eg

# fdisk -l /dev/DRIVE
Disk /dev/sdc: 931,5 GiB, 1000204886016 bytes, 1953525168 sectors
Units:                              sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes      «-- physical sector size
I/O size (minimum/optimal):         4096 bytes / 4096 bytes     «--

Check S.M.A.R.T. values for possible defect ? eg

# smartctl -a /dev/DEVICE \
| grep -i 'ID\|reallocated\|pending\|uncorrectable'

As any bad value (eg. Val/ue > Worst) for Reallocated_Sectors, offline uncorrectable, pending sectors, and Error log, is bad news and brings the hdd to warranty. [2]

Check blocks reliability? if so on whole disk? eg

# dd if=/dev/zero of=/dev/sdb bs=[physical sector size] & pid=$!
kill -USR1 $pidnumer

Where the kill -USR1 $pidnumer shows how far the zeroing has progressed. conv and noerror can be added to ensure that every block is tried and upon error (errors are shown in terminal) the zeroing continues [2]

Do you trust S.M.A.R.T. report and if so, which ones? Or do you run additional/other test [3] before you trust the hard drive start using it?

I'd like very much to hear your options.

[2]: Thanks to @DebianJunkie at Hard drive checking by using dd and md5sum tools [3]: like Bonnie++, Hitachi Drive Fitness Test, HDD Regenerator which I know very little about.

9
  • To the down voter, please say why. There's hundreds ways to improve a question (or not).
    – tuk0z
    Oct 1, 2015 at 21:11
  • Is there an actual problem here? It looks like you're just asking how people test an HDD before using it, which is off-topic as it's going to generate a lot of opinion based answers. Oct 2, 2015 at 1:32
  • @MichaelFrank you mean there's no way to check a spinning HDD state before putting it in use? Let me clarify my request (hopefully): As no manufacturer nor seller ;) is error prone, when I get a device that I'm used to I check a few key points to evaluate its state, especially one I must count on it (e.g. for a bike: tires, chain, platters, brakes... before letting my daughter go to school on it). As for HDDs, better know earlier than latter, ain't it?
    – tuk0z
    Oct 2, 2015 at 18:03
  • No, I'm just saying that this question isn't a good fit for SuperUser. It's a good question, and would make a good discussion, but not a SU. Oct 2, 2015 at 18:06
  • 2
    I think this is a fairly good question. Prevention is far better than cure. Given how many questions there are asking "How do I recover data from a broken drive" I think it's perfectly on-topic to ask "How do I minimize my chances of having a drive break" in the first place. Especially when we have quantitative information on certain readings that correlate with earlier failures from large-scale studies.
    – qasdfdsaq
    Oct 5, 2015 at 15:58

1 Answer 1

2

If I wasn't my reckless self, I might try these things:

Check smart info

smartctl -a /dev/sda

Run a short smart test

smartctl -t short /dev/sda

Run conveyance test

smartctl -t conveyance /dev/sda

Test disk speed

hdparm -t /dev/sda

Check for kernel messages

dmesg
5
  • ^_^ and thanks for sharing @RyanBabchishin. Taught me -t conveyance. In your experience does a brand new disk that is checked out of the box, reports trustable SMART attributes values (or better have it powered ON for a moment before)? And which attributes do you read first to quickly check a brand new drive? Add a -l selftest to read the test results, and if passed, that would very quickly allows that HDD to be used much less blindly.
    – tuk0z
    Oct 5, 2015 at 20:24
  • 1
    I've never received a faulty drive, so I can't say. The only time I've had a smart test fail to detect a problem is once, an SSD was slow and locking up the computer. There were no kernel messages. I ran smartctl -t short and smartctl -a, everything was fine. It turned out the power supply was about to die and was giving choppy/low power to the drive. Oct 5, 2015 at 20:32
  • I'm more interested in the results of a self test. I don't understand how to interpret all of the smart values so I have to look them up every time. Oct 5, 2015 at 20:39
  • Find the new SSD locks "thanks" to a dying PSU share valuable --pesky PSU/transistors issues :/ As for SMART, I start by checking the capabilities (-c). Any SU with some feedback on eg which SMART attributes you check first?
    – tuk0z
    Oct 5, 2015 at 20:51
  • As for BadBlocks: How many bad sectors do you tolerate in a new hard drive before returning it? and reddit.com/r/linux4noobs/comments/223lrp/… answer my question and give precious realcase feedbacks.
    – tuk0z
    Nov 5, 2015 at 12:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .