Stress Test – Burn in test – For hard drives

I have recently purchased some hard drives to easily backup some files. Basic data duplication and then taking it off site. It is a short term solution to our backup needs.

So we got 3 1TB hard drives and I wanted some way to quickly test them.

Update

sudo fdisk -l

to list all your devices
/Update

Running Ubuntu there is a few things you can do to test it. The first tests the cache performance.

hdparm -tT /dev/sdX #for me I’m testing sdb, so replace sdX with whatever drive you want to test.

Be very careful with that command as some of the flags (7/40) are highly destructive to the current operating system and can render the system unusable.

The second method which I am currently using is badblocks. This little app will write and read from every block on the drive, seems to work well.
(This will ERASE ALL data on the drive)

badblocks -vw /dev/sdX #for me I’m testing sdb, so replace sdX with whatever drive you want to test.

(run without the ‘w’ flag and it shouldn’t erase the data, but check the man badblocks page for confirmation)

Another method is writing random data to the disk at the same time as reading data from it. Should give the heads a workout.
(This will ERASE ALL data on the drive)

dd if=/dev/urandom of=/dev/sdX & #for me I’m testing sdb, so replace sdX with whatever drive you want to test.
dd if=/dev/sdXof=/dev/null & #for me I’m testing sdb, so replace sdX with whatever drive you want to test.

Posted on July 28, 2009 at 12:00 pm by Jordan Carter · Permalink
In: Ubuntu Tricks · Tagged with: 

3 Responses

  1. Written by John A
    on August 9, 2012 at 7:28 am
    Permalink

    Thanks for the commands. Found a few typo’s:

    “#for me I’m testing sdb, so repace sdX”
    “repace” is missing an “i”: replace, in four instances.

    “dd if=/dev/sdXof=/dev/null ”
    needs a space in there, after the device:
    dd if=/dev/sdX of=/dev/null

    “Getting computers to do stuff so we don’t have too”
    The word is “to”, not “too” (as in “also”)

    Cheerio.

  2. Written by Gerald
    on September 13, 2012 at 2:19 am
    Permalink

    So how the heck do you know that the thing is happening? I’m trying this one:

    dd if=/dev/urandom of=/dev/sdX

    And it just sits… I THINK its doing something but its hard to tell… Running Ubuntu 12.10 on a live usb stick

  3. Written by Jordan Carter
    on October 23, 2012 at 10:14 pm
    Permalink

    Its a really low level command, it doesn’t output anything as far as I know. Could check the docs though.

Leave a Reply