HDD stress test

Status
Not open for further replies.

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
Thanks. Guess I should have gone back to Newegg with it instead of WD. Live and learn.
 

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
Few things...

Yes, it says "SMART overall-health self-assessment test result: PASSED" and that is normal despite failing a SMART test. That assessment is solely based on if you've failed any monitored parameters by going below the threshold value. Hint: You haven't.

You get an RMA if you have a failed SMART test. You'd think that bad sectors and such would qualify, but that's not entirely correct. A failed SMART test qualifies you. But if you have bad sectors then a SMART test will fail (whether performed by you or by the manufacturer).

As for the RMA sending you a "recertified" drive, there's a possibility it will be some used drive. It could be a drive that had a manufacturing defect at a higher capacity and was recertified for a smaller quantity of data. I don't think anyone has solid evidence (such as an employee of the company) that they actually use used drives, but it's a pretty simple foregone conclusion that they get many drives back that work fine and they simply run them through a gambit of tests, throw a "recertified" sticker on it, and put it in the pool of drives to go out for an RMA.

If you are adamant that you want a new disk then you basically have that 30 day window when you buy a hard drive to get another new drive from the place of purchase. After that you'll almost certainly get a "recertified" drive.
One of the original five Seagate ST32000641AS drives I bought failed after about a year and was replaced under warranty by a "Remanufactured" (I'm pretty sure that was the word on the label) ST2000DM001 with the balance of the original drive's 5-year warranty (whereas the ST2000DM001 drives normally have only a 2-year warranty). It is still going strong. Apart from the word "Remanufactured" on the label, another distinctive is the suffix to the model#: 9YN164, whereas the ST2000DM001 drives I've bought -- either as such or as the STBD2000101 retail-packaged counterpart -- have the 1CH164 or 1ER164 suffix (the latter suffix on the two that arrived this week). The warranty replacement also has a unique firmware version: CC9F rather than CC2x. When I enter the Model# and Serial# on the Seagate Website, they tell me that there is updated firmware for it, but it refuses to install, with a message that it is not the correct version for that drive -- so perhaps this is a drive that was originally supposed to have a higher capacity but has been reconfigured as a 2TB model.

Years ago I read that, since solid-state electronics mostly fails withi the first 100 hours or keeps going for years and years (of course hard disks are a special case because of the mechanical parts), a remanufactured or recertified device has actually undergone more extensive pre-sale testing than the "brand new" ones.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Thanks. Guess I should have gone back to Newegg with it instead of WD. Live and learn.
Might want to buy from Amazon in the future--they pay return shipping on defective returns, and will cross-ship new product at no extra cost. Last time I did a defective return to newegg (admittedly, several years ago), I ate shipping both ways. I still buy quite a bit at newegg, but I compare at Amazon as well.
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
Good point, I'll keep that in mind next time. Thanks
 

nick779

Contributor
Joined
Dec 17, 2014
Messages
189
I read a bit about these "current pending" sector errors and decided to write to the whole disk and see what would happen. I wrote up a script to make 5 parallel writes of about 3 TB each just to give it some more stress.

It didn't finish, but the Current Pending Sector went from 2 to 0, and the Raw Read Error Rate went from 0 to 2. Reallocated sectors are still 0. Not sure whether that means it fixed itself or not, but during the writing in the middle of the night I got an cryptic email. Anyone know what it means (ada1 is the troubled disk)?

I already set up the RMA, but I wanted to check further since I've heard that WD often replaces new RMA'd drives with used ones.

Would you mind sharing the script you used? Im trying to test a 1.5tb 2.5" archive drive and it looks like badblocks is going to take around 4 days per pass, so I have some time to kill.

I dont know if its the nature of badblocks, but id like to do a full write/read test perhaps with DD, I just have no idea how to really run it so it fills the disk.
 
Last edited:

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
Would you mind sharing the script you used? Im trying to test a 1.5tb 2.5" archive drive and it looks like badblocks is going to take around 4 days per pass, so I have some time to kill.
Well it's been almost a year, and I don't use shell scripts enough to know how to edit or understand it now without a lot of research. It is pasted below, but with no guarantee it won't result in a zombie apocalypse followed by core meltdown.

The first part of the script, commented out, is for multiple disks I gather. The uncommented portion is for one disk. You would change the number defined as "DISK" to the drive you want to stress. Since I wrote this for 3-TB disks and yours is 1.5 TB, you could probably change the counts from 3000000 to 1500000, but someone correct me if that's wrong.

Edit: Actually the 3,000,000 does seem wrong now that I work it out on the bit calculator on my phone. With a block size of 1,048,576 bits, it would take around 25,000,000 to fill 3 TB I think?
Code:
#! /bin/sh -

# for i in 1 2 3 4; do
#     echo "Beginning round "${i}
#     for disk in 0 1 2 3 4 5; do
#         dd if=/dev/zero of=/dev/ada${disk} bs=1048576 count=3000000 &
#     echo "disk "${disk}" started"
#     done
# sleep 60
# done
# echo "Beginning round 5"
# echo "disk 1 starting"
# dd if=/dev/zero of=/dev/ada0 bs=1048576 count=3000000 &
# echo "disk 2 starting"
# dd if=/dev/zero of=/dev/ada1 bs=1048576 count=3000000 &
# echo "disk 3 starting"
# dd if=/dev/zero of=/dev/ada2 bs=1048576 count=3000000 &
# echo "disk 4 starting"
# dd if=/dev/zero of=/dev/ada3 bs=1048576 count=3000000 &
# echo "disk ada3 starting"
# dd if=/dev/zero of=/dev/ada4 bs=1048576 count=3000000 &
# echo "disk 6 starting"
# dd if=/dev/zero of=/dev/ada5 bs=1048576 count=3000000
#
# done

# For single disk

DISK="3"

for i in 1 2 3 4; do
    dd if=/dev/zero of=/dev/ada${DISK} bs=1048576 count=3000000 &
    echo "started writing round ${i} on disk ada${DISK}"
    sleep 60
done
sleep 600
for i in 1 2 3 4; do
    dd if=/dev/ada${DISK} of=/dev/null bs=1048576 count=3000000 &
    echo "started reading round ${i} on disk ada${DISK}"
    sleep 60
done

done
 
Last edited:

nick779

Contributor
Joined
Dec 17, 2014
Messages
189
Well it's been almost a year, and I don't use shell scripts enough to know how to edit or understand it now without a lot of research. It is pasted below, but with no guarantee it won't result in a zombie apocalypse followed by core meltdown.

The first part of the script, commented out, is for multiple disks I gather. The uncommented portion is for one disk. You would change the number defined as "DISK" to the drive you want to stress. Since I wrote this for 3-TB disks and yours is 1.5 TB, you could probably change the counts from 3000000 to 1500000, but someone correct me if that's wrong.

Edit: Actually the 3,000,000 does seem wrong now that I work it out on the bit calculator on my phone. With a block size of 1,048,576 bits, it would take around 25,000,000 to fill 3 TB I think?
Code:
#! /bin/sh -

# for i in 1 2 3 4; do
#     echo "Beginning round "${i}
#     for disk in 0 1 2 3 4 5; do
#         dd if=/dev/zero of=/dev/ada${disk} bs=1048576 count=3000000 &
#     echo "disk "${disk}" started"
#     done
# sleep 60
# done
# echo "Beginning round 5"
# echo "disk 1 starting"
# dd if=/dev/zero of=/dev/ada0 bs=1048576 count=3000000 &
# echo "disk 2 starting"
# dd if=/dev/zero of=/dev/ada1 bs=1048576 count=3000000 &
# echo "disk 3 starting"
# dd if=/dev/zero of=/dev/ada2 bs=1048576 count=3000000 &
# echo "disk 4 starting"
# dd if=/dev/zero of=/dev/ada3 bs=1048576 count=3000000 &
# echo "disk ada3 starting"
# dd if=/dev/zero of=/dev/ada4 bs=1048576 count=3000000 &
# echo "disk 6 starting"
# dd if=/dev/zero of=/dev/ada5 bs=1048576 count=3000000
#
# done

# For single disk

DISK="3"

for i in 1 2 3 4; do
    dd if=/dev/zero of=/dev/ada${DISK} bs=1048576 count=3000000 &
    echo "started writing round ${i} on disk ada${DISK}"
    sleep 60
done
sleep 600
for i in 1 2 3 4; do
    dd if=/dev/ada${DISK} of=/dev/null bs=1048576 count=3000000 &
    echo "started reading round ${i} on disk ada${DISK}"
    sleep 60
done

done

So there isnt just a way for it to know to write to the entire disk? Is the block size relevant for the test if you arent using a count parameter?

Im currently running a dd of=/dev/zero if=dev/ada0 and ill report back with what it writes.
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
The block size is relevant for speed, regardless of how much data you will copy. The default block size of 512 is inefficient (based on old computers) and higher block sizes can work about 10x faster.

If you don't use 'count', it will run forever or until the source runs out. I think /dev/zero will never run out.

By the way, I think your command is backwards. You are reading from the disk, not writing. And I think it is better to put 'if' before 'of' in the command.
 

nick779

Contributor
Joined
Dec 17, 2014
Messages
189
The block size is relevant for speed, regardless of how much data you will copy. The default block size of 512 is inefficient (based on old computers) and higher block sizes can work about 10x faster.

If you don't use 'count', it will run forever or until the source runs out. I think /dev/zero will never run out.

By the way, I think your command is backwards. You are reading from the disk, not writing. And I think it is better to put 'if' before 'of' in the command.

So with /dev/zero it wouldnt stop when it fills the drive?
It seems that the physical block size is 4096b so ill tack on a "bs=4096" and that would give a "count=366284646" for 1.5tb (1,500,301,910,016 bytes)

A full capacity write test should be "dd if=/dev/zero of=/dev/ada1 bs=4096 count=366284646" if im right.

Also, the how to I was reading stated that "dd if=/dev/zero of=/dev/ada0" was a read test and if you wanted a write test you flipped the if and of. Is that not correct?

What would the read test be?
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
No, I think if you don't specify a count it will just rewind and fill the drive over and over.

If you read the man page, 'if' is input file, the source. So if you want to write, that should be /dev/zero. 'of' is the output file, or destination. So I think your reference had it backwards.

According to my calculator, with a block size of 4096 bytes, you would need a count of about 3,221,225,600 to fill the drive, not 366,284,646 as you stated.

Correction: I had my calculator set on bits instead of bytes. It should be:
4096 bytes x 402,653,184 = 1.5 TB
 
Last edited:

ChiknNutz

Patron
Joined
Nov 6, 2015
Messages
217
I have tried to run this script and I keep getting errors, a couple of which are shown below. Based on this, does it appear the script is actually executing as I am really new to running scripts on FreeNAS?

line 2: $'\r': command not found
line 37: $'\r': command not found
 

ChiknNutz

Patron
Joined
Nov 6, 2015
Messages
217
Here is exactly what I am getting after running the script. I have tried this a couple of different ways, trying to be sure the code from the FTP site was pasted as unformatted text. Is this still a formatting issue?

Code:
/mnt/Rivendell/TEMP/bin/nastest.sh: line 2: $'\r': command not found
/mnt/Rivendell/TEMP/bin/nastest.sh: line 37: $'\r': command not found
: invalid optionEMP/bin/nastest.sh: line 38: set: -
set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
/mnt/Rivendell/TEMP/bin/nastest.sh: line 46: $'\r': command not found
/mnt/Rivendell/TEMP/bin/nastest.sh: line 47: syntax error near unexpected token `$'{\r''
'mnt/Rivendell/TEMP/bin/nastest.sh: line 47: `samplediskspeed() {
[root@AdcNAS] ~#
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
Is this still a formatting issue?
Looks that way to me.

Try downloading the attached file.

Or is it the solnet script you want (also attached)?
 

Attachments

  • script.txt
    1.1 KB · Views: 289
  • solnet-array-test-v2.txt
    9.3 KB · Views: 319
Last edited:

ChiknNutz

Patron
Joined
Nov 6, 2015
Messages
217
Was looking for the solnet script. Looks like this was the issue. I didn't know that there were embedded carriage returns even after pasting in as unformatted text. Thanks for the help on this, much appreciated!
 
Status
Not open for further replies.
Top