Resource icon

Hard Drive Burn-In Testing - Discussion Thread

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
Just a quick question. I am running through this again with a few more drives.

I am up to badblocks.

Code:
[root@freenas] ~# sysctl kern.geom.debugflags=0x10
kern.geom.debugflags: 16 -> 16
[root@freenas] ~# badblocks -b 4096 -ws /dev/ada2
Testing with pattern 0xaa: set_o_direct: Inappropriate ioctl for device
26.12% done, 2:36:16 elapsed. (0/0/0 errors)


Do i need to do anything with the "inappropriate ioctl for devices'?

Or is that OK for a 6TB drive?

Thanks,
Rich
Hmmm... I don't know!

Looks as though badblocks is running, so at least it didn't bomb out. I would abort the test and restart it with a larger block size - badblocks -b 8192 -ws /dev/ada2 - to check and see if it's a glitch attributable to the large size of your drive. BTW, if you find out that my hunch is correct - let me know and I will modify this script on Github.

EDIT: I got the same message when I ran badblocks on a 2TB drive under FreeNAS 9.10.2. I looked at the source code and in my semi-expert opinion it's more in the nature of a warning than an error in our case, as it doesn't seem to adversely affect the program's operation.
 
Last edited:
D

Deleted47050

Guest
Just a quick question. I am running through this again with a few more drives.

I am up to badblocks.

Code:
[root@freenas] ~# sysctl kern.geom.debugflags=0x10
kern.geom.debugflags: 16 -> 16
[root@freenas] ~# badblocks -b 4096 -ws /dev/ada2
Testing with pattern 0xaa: set_o_direct: Inappropriate ioctl for device
 26.12% done, 2:36:16 elapsed. (0/0/0 errors)


Do i need to do anything with the "inappropriate ioctl for devices'?

Or is that OK for a 6TB drive?

Thanks,
Rich

This was shared a couple of pages ago in this thread: https://forums.freenas.org/index.php?threads/badblocks-testing-inappropriate-ioctl-for-device.26015/

Nothing to worry about, apparently.
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478

ReadyPlayGo

Dabbler
Joined
Mar 2, 2016
Messages
15
This is my first experience with FreeNAS or burning in HDDs, but I've been able to get by with nothing but documentation thus far.

If I try to run smartctl commands, I am met with:
Code:
/dev/adaX: Unable to detect device type
Please specify device type with the -d option.


If I try running the disk-burnin.sh off github via SSH, I am met with:
Code:
[root@freenas] /etc# ./disk-burnin.sh
./disk-burnin.sh: 7: Syntax error: newline unexpected (expecting word)


This is likely an exceedingly amateur error, but I'm not sure where else to go from here; thanks for any help.

For context, I have 6x6TB Reds, all brand new (direct from WD) that I'm trying to test and burn in for a RAIDZ2 volume.
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
This is my first experience with FreeNAS or burning in HDDs, but I've been able to get by with nothing but documentation thus far.

If I try to run smartctl commands, I am met with:
Code:
/dev/adaX: Unable to detect device type
Please specify device type with the -d option.
That's odd... How did you obtain the list of drives on your system?

If you start a shell (either from the FreeNAS 9.x GUI or using PuTTY on Windows) you should be able to get the list of drives on your system with the smartctl --scan command, like this:
Code:
[root@boomer ~]# smartctl --scan												
/dev/cd0 -d atacam # /dev/cd0, ATA device									  
/dev/da0 -d scsi # /dev/da0, SCSI device										
/dev/da1 -d scsi # /dev/da1, SCSI device										
/dev/da2 -d scsi # /dev/da2, SCSI device										
/dev/da3 -d scsi # /dev/da3, SCSI device										
/dev/da4 -d scsi # /dev/da4, SCSI device										
/dev/da5 -d scsi # /dev/da5, SCSI device										
/dev/da6 -d scsi # /dev/da6, SCSI device										
/dev/da7 -d scsi # /dev/da7, SCSI device										
/dev/da8 -d scsi # /dev/da8, SCSI device										
/dev/ada0 -d atacam # /dev/ada0, ATA device									
[root@boomer ~]#
Note: if you're not logged on as root, you need to use sudo to run both smartctl and disk-burnin.sh, like this: sudo smartctl --scan

Once you know the list of drives on your system, you can run smartctl on individual drives. For example, to pull attribute information for /dev/ada0 you would run smartctl -A /dev/ada0:
Code:
[root@boomer] ~# smartctl -A /dev/ada0
smartctl 6.5 2016-05-07 r4318 [FreeBSD 10.3-STABLE amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME  FLAG  VALUE WORST THRESH TYPE  UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate  0x002f  200  100  051  Pre-fail  Always  -  0
  3 Spin_Up_Time  0x0027  184  100  021  Pre-fail  Always  -  9775
  4 Start_Stop_Count  0x0032  100  100  000  Old_age  Always  -  79
  5 Reallocated_Sector_Ct  0x0033  200  200  140  Pre-fail  Always  -  0
  7 Seek_Error_Rate  0x002e  100  100  000  Old_age  Always  -  0
  9 Power_On_Hours  0x0032  095  095  000  Old_age  Always  -  3797
 10 Spin_Retry_Count  0x0032  100  100  000  Old_age  Always  -  0
 11 Calibration_Retry_Count 0x0032  100  100  000  Old_age  Always  -  0
 12 Power_Cycle_Count  0x0032  100  100  000  Old_age  Always  -  25
192 Power-Off_Retract_Count 0x0032  200  100  000  Old_age  Always  -  1
193 Load_Cycle_Count  0x0032  200  100  000  Old_age  Always  -  77
194 Temperature_Celsius  0x0022  111  107  000  Old_age  Always  -  41
196 Reallocated_Event_Count 0x0032  200  100  000  Old_age  Always  -  0
197 Current_Pending_Sector  0x0032  200  100  000  Old_age  Always  -  0
198 Offline_Uncorrectable  0x0030  200  100  000  Old_age  Offline  -  0
199 UDMA_CRC_Error_Count  0x0032  200  200  000  Old_age  Always  -  0
200 Multi_Zone_Error_Rate  0x0008  200  100  000  Old_age  Offline  -  0
[root@boomer] ~#
If I try running the disk-burnin.sh off github via SSH, I am met with:
Code:
[root@freenas] /etc# ./disk-burnin.sh
./disk-burnin.sh: 7: Syntax error: newline unexpected (expecting word)


This is likely an exceedingly amateur error, but I'm not sure where else to go from here; thanks for any help.

For context, I have 6x6TB Reds, all brand new (direct from WD) that I'm trying to test and burn in for a RAIDZ2 volume.
How did you install the script? Did you download the repo from github in a zip file and extract it? Or did you copy and paste it?

This error may be because you've somehow saved the script with Windows-style CR-LF newlines, instead of the LF-only newlines needed and expected on FreeNAS (and every other Unix-derived operating system). This has caused no end of trouble in the world... :(

Anyhow, as a test I downloaded the zip from github just now, extracted the file, and ran it unchanged on my FreeNAS system against my drive ada0:
Code:
[root@boomer] /mnt/tank/systems/diskburnin# ./disk-burnin.sh ada0
rm: ./burnin-WDC_WD6001FZWX-00A2VA0_WD-WX31DB5L6K4K.log: No such file or directory
+-----------------------------------------------------------------------------
+ Started burn-in of /dev/ada0 on boomer : Thu Mar 30 22:37:52 CDT 2017
+-----------------------------------------------------------------------------
Drive Model: WDC_WD6001FZWX-00A2VA0
Serial Number: WD-WX31DB5L6K4K
Short test duration: 2 minutes
Short test sleep duration: 150 seconds (includes extra delay of 30 seconds)
Extended test duration: 579 minutes
Extended test sleep duration: 35040 seconds (includes extra delay of 300 seconds)
Log file: ./burnin-WDC_WD6001FZWX-00A2VA0_WD-WX31DB5L6K4K.log
Bad blocks file: ./burnin-WDC_WD6001FZWX-00A2VA0_WD-WX31DB5L6K4K.bb
+-----------------------------------------------------------------------------
+ Run SMART short test on drive /dev/ada0: Thu Mar 30 22:37:52 CDT 2017
+-----------------------------------------------------------------------------
Dry run: would start the SMART short test and sleep 150 seconds until the test finishes
Finished SMART short test on drive /dev/ada0: Thu Mar 30 22:37:52 CDT 2017
+-----------------------------------------------------------------------------
+ Run SMART extended test on drive /dev/ada0: Thu Mar 30 22:37:52 CDT 2017
+-----------------------------------------------------------------------------
Dry run: would start the SMART extended test and sleep 35040 seconds until the test finishes
Finished SMART extended test on drive /dev/ada0: Thu Mar 30 22:37:52 CDT 2017
+-----------------------------------------------------------------------------
+ Run badblocks test on drive /dev/ada0: Thu Mar 30 22:37:52 CDT 2017
+-----------------------------------------------------------------------------
Dry run: would run badblocks -b 4096 -wsv -o ./burnin-WDC_WD6001FZWX-00A2VA0_WD-WX31DB5L6K4K.bb /dev/ada0
Finished badblocks test on drive /dev/ada0: Thu Mar 30 22:37:52 CDT 2017
+-----------------------------------------------------------------------------
+ Run SMART short test on drive /dev/ada0: Thu Mar 30 22:37:52 CDT 2017
+-----------------------------------------------------------------------------
Dry run: would start the SMART short test and sleep 150 seconds until the test finishes
Finished SMART short test on drive /dev/ada0: Thu Mar 30 22:37:52 CDT 2017
+-----------------------------------------------------------------------------
+ Run SMART extended test on drive /dev/ada0: Thu Mar 30 22:37:52 CDT 2017
+-----------------------------------------------------------------------------
Dry run: would start the SMART extended test and sleep 35040 seconds until the test finishes
Finished SMART extended test on drive /dev/ada0: Thu Mar 30 22:37:52 CDT 2017
+-----------------------------------------------------------------------------
+ Finished burn-in of /dev/ada0 on boomer : Thu Mar 30 22:37:52 CDT 2017
+-----------------------------------------------------------------------------
[root@boomer] /mnt/tank/systems/diskburnin#

It's working correctly: you have to edit the script and change Dry_Run=1 to Dry_Run=0 before it will actually write to your disk.

I suggest you edit the file on FreeNAS (or Linux or whatever OS you're using) to avoid any possible newline problems that Windows notepad or other non-Unix editors might introduce. FreeNAS comes with both the vi and nano text editors, of which I prefer nano.

Let us know if you have any more problems.

Good luck!
 

ReadyPlayGo

Dabbler
Joined
Mar 2, 2016
Messages
15
I'm logged in as root and tried the command:
Code:
smartctl --scan
followed by
Code:
smartctl -A /dev/ada0


I still receive the "specify device type with the -d option" response, though.
ySKzW8H.png


In tried locally running the script as follows:
  1. Downloaded the .sh file on a Windows 10 machine
  2. Copied it over to the /etc directory of FreeNAS using WinSCP
  3. navigated to /etc and then issued the command ./disk-burnin.sh
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
I'm logged in as root and tried the command:
Code:
smartctl --scan
followed by
Code:
smartctl -A /dev/ada0


I still receive the "specify device type with the -d option" response, though.
ySKzW8H.png


In tried locally running the script as follows:
  1. Downloaded the .sh file on a Windows 10 machine
  2. Copied it over to the /etc directory of FreeNAS using WinSCP
  3. navigated to /etc and then issued the command ./disk-burnin.sh
You're specifying device /dev/ada0 -- but you don't have that device installed on your system. That's why smartctl returns the error message 'Unable to detect device type'.

You need to use a device actually installed on your system, i.e., one of the ones listed when you ran smartctl --scan: /dev/da0, /dev/da1, /dev/da2, /dev/da3, /dev/da4, or /dev/da5.

Try this command, for example: smartctl -A /dev/da0.

Regarding the disk-burnin.sh script, try downloading the zip file from github and extracting the script from it, as I described above. I think you introduced the newline problem when you downloaded it directly.
 

ReadyPlayGo

Dabbler
Joined
Mar 2, 2016
Messages
15
That thought had crossed my mind, however when you run smartctl --scan you listed the same device type labels as mine, so I assumed the subsequent ada0 was just a necessary command modification.

I'll give it another shot using the exact device types listed; thanks.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
No, ada is for ATA devices, da is for everything that uses the SCSI stack (surprisingly common).
 

glauco

Guru
Joined
Jan 30, 2017
Messages
526
Hey guys! I'm waiting for parts to arrive to build my first FreeNAS box. In the meantime, all I have for now is 6 x WD30EFRX and even if still I don't have all the parts I need to test them all simultaneously, what I can do is connect them to my desktop PC via a USB 3.0 to SATA converter cable and run quick or extended SMART tests using Western Digital Data Lifeguard Diagnostics for Windows. Do you think that is enough to find out if a drive is fit for the FreeNAS box?
Thank you.
 
D

Deleted47050

Guest
Hey guys! I'm waiting for parts to arrive to build my first FreeNAS box. In the meantime, all I have for now is 6 x WD30EFRX and even if still I don't have all the parts I need to test them all simultaneously, what I can do is connect them to my desktop PC via a USB 3.0 to SATA converter cable and run quick or extended SMART tests using Western Digital Data Lifeguard Diagnostics for Windows. Do you think that is enough to find out if a drive is fit for the FreeNAS box?
Thank you.

Most USB enclosures or adapters do not support SMART tests, if you cannot wait for all your items to arrive, I would plug the drives in your desktop and test it there, straight with SATA.
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
Most USB enclosures or adapters do not support SMART tests, if you cannot wait for all your items to arrive, I would plug the drives in your desktop and test it there, straight with SATA.
smartctl should be able to display S.M.A.R.T info and perform S.M.A.R.T tests on drives connected to an external case by specifying -d ata
 

glauco

Guru
Joined
Jan 30, 2017
Messages
526
Most USB enclosures or adapters do not support SMART tests, if you cannot wait for all your items to arrive, I would plug the drives in your desktop and test it there, straight with SATA.
The adapter I'm using apparently supports SMART tests.
Hopefully, the results page will be meaningful enough to assess whether the drive is safe to be used or should be returned. Has anybody used this WD tool before and found it useful?
o2kz8hg.png
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
@glauco All adapters and external casings I've come across support S.M.A.R.T, however I don't recommend utilizing a GUI application, instead utilizing smartctl, as I'm not aware of any S.M.A.R.T GUI application that supports full S.M.A.R.T functionality.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
@glauco All adapters and external casings I've come across support S.M.A.R.T, however I don't recommend utilizing a GUI application, instead utilizing smartctl, as I'm not aware of any S.M.A.R.T GUI application that supports full S.M.A.R.T functionality.
Yeah, I'll venture a guess that most USB SATA bridges support SMART.

As for GUIs, there's gsmartcontrol, which is just a small wrapper around smartmontools (smartctl).
 
D

Deleted47050

Guest
Then I guess it's time for me to replace my SATA adapters, apparently they all suck and I am stuck in the past.


Sent from my iPhone using Tapatalk
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Thete is a windows based SMARTCTL application called smartmontools. I use this on my Windoze 7 computer when I need to test a drive on this system.

You launch this in a dos prompt and enter the drive letter, example if the drive is letter x: smartctl -a x: and it works well. You can run the tests as well. But if you want to run badblocks then you would need to do something a bit more drastic and you need to take precautions to ensure you don't wipe out your comupter data drive(s).
 
Last edited:

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
Then I guess it's time for me to replace my SATA adapters, apparently they all suck and I am stuck in the past.
Before you do so, try issuing smartctl with -d ata.... for example smartctl -a -d ata /dev/da0 ( -d ata and -a may need to be reversed)
  • smartctl must be told what type of disk is being queried if it's connected to an intermediary interface, which is what the -d (TYPE) parameter is for. It can recognize ~15 different device types
 
Last edited:
D

Deleted47050

Guest
I will have to try that, thanks for the tip. It's been a long time since I needed to test a drive which was not connected via SATA, and last time I tried to do that (I am talking years ago now) I remember it not working.

I will keep your suggestion in mind for next time though.


Sent from my iPhone using Tapatalk
 

glauco

Guru
Joined
Jan 30, 2017
Messages
526
Hey guys!
After 7 hours, the 3TB HDD just passed the extended SMART test!
ylq39NH.png

As you can see, the result just says "pass". I have no idea what exactly has happened. All I know is what the software page states: that the extended test performs a full media scan to detect bad sectors.
If you were me, would you be satisfied with this result or would you play it safe and run smartctl?
 
Top