Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a whole bunch of hard drives (maybe 10 or so) from a variety of sources that I'd like to test. If they work, I will put them in use and/or give them away. I was going to simply open up one of my machines and plug each one in, one at a time, and troubleshoot from there. Is there a way (or set of tools) that I can use to make this process easier and/or faster?

share|improve this question
up vote 3 down vote accepted

I usually put a batch of drives into an Internet-connected spare computer, then go through the steps below.

Note that if you have multiple drives hooked up at the same time, it's a lot easier to identify which one you're working with if you just make sure not to hook up two of the same model. Of course, you can also identify the drives based upon the order in which they're hooked up, but it's brain-dead simple if the drives are all different models.

  1. Boot from an Ubuntu Linux live CD
  2. Open a terminal, then run the commands below (note the '#' designates the shell prompt)
  3. # sudo bash
  4. # apt-get install smartmontools (this is the part that requires Internet access)
  5. # fdisk -l to list the drives' sizes and device IDs (/dev/sdX, where X is an unique letter for each drive, starting from 'a'). Note this list, and perform the rest of the steps on each hard drive.
  6. # smartctl -a /dev/sdX where sdX is the hard drive device ID. Look at the events that indicate "pre-failure," such as Reallocated Count. If the "WORST" value for realloc is lower than 100, the drive has already started to degrade; throw it out. (Technically, you can wait until WORST reaches THRESHOLD, but you'll take a performance hit every time you try to read or write a reallocated sector.)
  7. If smartctl shows nothing of concern, run a badblock scan: # badblocks -nvs /dev/sdX if the drive still has data, or # badblocks -wvs /dev/sdX if you want to wipe the data and do a more thorough bad block scan. If badblocks finds any bad blocks, throw the drive away--its spare sectors for bad sector reallocation are all used up.
  8. If badblocks passed, run, # smartctl -a /dev/sdX again to see if the bad block scan turned up any newly-reallocated sectors. If the drive has a clean bill of health at this point, it's safe to put back into service. If you ran badblocks -wvs in the previous step, they are probably also wiped thoroughly enough to give away, if you have no better use for them.

If you want, you can open up a separate terminal for each drive and run the bad block scans in parallel, so you don't have to keep checking on the status of one drive before moving onto the next. Depending on the sizes of your drives, you may need to let the scan run overnight anyway.

share|improve this answer
Thanks for the detailed answer. – lions_leash Apr 12 '10 at 15:25

If they are SATA drives, then they are hotpluggable. So just find a PC where you can insert and remove harddrives from the front cover (without opening it up). This would make the insertion/removal process a lot faster.

Other than that, get a thing to check the SMART status and if the SMART says it's not in horrible condition, then do a full format of the drive. If it has any bad sectors afterwards, then it is most likely bad. Modern harddrives' firmware have extra sectors that get mapped to bad sectors when they are first detected as bad. So, if the OS is seeing bad sectors, that means a lot of sectors are already bad, which means, it doesn't have much life left.

share|improve this answer

Drive testing takes a while. You could create a script that would prompt you to connect a drive and hit enter, then does a 'badblocks' check (or whatever drive-checking software you want to run) on that drive, then beeps to alert you to disconnect the drive and connect the next drive. You could have the script prompt you for a drive name or number and record all the results.

I suppose you could also (if you have the necessary connectors and hubs) connect all the drives at once via USB SATA or PATA adapters and then have a script find and test them all, possibly in parallel. I'm not sure what limit(s) you might hit there. I've never tested more than one drive at a time.

share|improve this answer
Heh, that'd only take a few weeks with the limitations of USB. I'd rather to use eSATA in combination with hooking all of the ones possible up with regular SATA inside the computer (most mobos now have 6 or ever 8 SATA ports) – Earlz Apr 9 '10 at 21:06
Yes, USB is an order of magnitude slower. Also, in my experience, SMART diagnostics don't work over USB-SATA or USB-PATA adapters. – rob Apr 9 '10 at 21:28

You must log in to answer this question.

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