Resource icon

Hard Drive Burn-In Testing - Discussion Thread

Joined
Apr 9, 2015
Messages
1,258
By default badblocks runs four different patterns. If it passes that it should be fine to put into use.
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Question about this process. I have 4 new 6tb drives - i did have no pools, nothing in the volume manager - I am running the tests as is without having any type of pool.

when using putty & the Control + B + " how do I "tab" around to see the various windows?


I am running the following (for the 4 drives) - when I type top, I dont really see anything happening. Should my reporting show disk activity? I am a little confused on how to see if something is happening.

Code:
[root@freenas] ~# smartctl -t long /dev/ada1
smartctl 6.3 2014-07-26 r3976 [FreeBSD 9.3-RELEASE-p31 amd64] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routine immediately in off-line mode".
Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 694 minutes for test to complete.
Test will complete after Thu Apr  7 23:26:28 2016

Use smartctl -X to abort test.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
This is as shortcut used with tmux, nothing to do with PuTTY

SMART are executed by the drive itself, you'll not see anything in top or ps or any other tool on the system. If you want to see the % completed then use smartctl -a /dev/adaX ;)
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Thanks for the help! Running badblocks now - should be a few days.
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Just curious - I have 4x 6tb WD reds - I am on hour 104 - It still says (0/0/0 errors) - Is there an end in sight or just wait?
 

qwertymodo

Contributor
Joined
Apr 7, 2014
Messages
144
You're getting close, just let it run. I want to say my 6x4TB test took around 80 hours, so I'd suspect you're looking at ~120 give or take.
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
So after several days - here are my results. All WD Red 6TB's. Does this look good to go?

I think so but figured I would wait for the experts. All "when failed" items are -


ADA0
Code:
[root@freenas] ~# smartctl -A /dev/ada0
smartctl 6.3 2014-07-26 r3976 [FreeBSD 9.3-RELEASE-p31 amd64] (local build)
Copyright (C) 2002-14, 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   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   100   253   021    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       4
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       164
 10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       4
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       0
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       9
194 Temperature_Celsius     0x0022   121   114   000    Old_age   Always       -       31
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   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   200   000    Old_age   Offline      -       0



ADA1
Code:
[root@freenas] ~# smartctl -A /dev/ada1
smartctl 6.3 2014-07-26 r3976 [FreeBSD 9.3-RELEASE-p31 amd64] (local build)
Copyright (C) 2002-14, 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   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   100   253   021    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       4
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       164
 10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       4
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       0
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       8
194 Temperature_Celsius     0x0022   120   110   000    Old_age   Always       -       32
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   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   200   000    Old_age   Offline      -       0



ADA2
Code:
[root@freenas] ~# smartctl -A /dev/ada2
smartctl 6.3 2014-07-26 r3976 [FreeBSD 9.3-RELEASE-p31 amd64] (local build)
Copyright (C) 2002-14, 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   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   100   253   021    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       4
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       164
 10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       4
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       0
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       9
194 Temperature_Celsius     0x0022   118   108   000    Old_age   Always       -       34
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   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   200   000    Old_age   Offline      -       0


ADA3
Code:
[root@freenas] ~# smartctl -A /dev/ada3
smartctl 6.3 2014-07-26 r3976 [FreeBSD 9.3-RELEASE-p31 amd64] (local build)
Copyright (C) 2002-14, 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   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   100   253   021    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       4
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       164
 10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       4
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       0
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       9
194 Temperature_Celsius     0x0022   120   110   000    Old_age   Always       -       32
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   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   200   000    Old_age   Offline      -       0
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
So after several days - here are my results. All WD Red 6TB's. Does this look good to go?

I think so but figured I would wait for the experts. All "when failed" items are -


ADA0
Code:
[root@freenas] ~# smartctl -A /dev/ada0
smartctl 6.3 2014-07-26 r3976 [FreeBSD 9.3-RELEASE-p31 amd64] (local build)
Copyright (C) 2002-14, 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   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   100   253   021    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       4
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       164
10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       4
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       0
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       9
194 Temperature_Celsius     0x0022   121   114   000    Old_age   Always       -       31
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   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   200   000    Old_age   Offline      -       0



ADA1
Code:
[root@freenas] ~# smartctl -A /dev/ada1
smartctl 6.3 2014-07-26 r3976 [FreeBSD 9.3-RELEASE-p31 amd64] (local build)
Copyright (C) 2002-14, 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   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   100   253   021    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       4
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       164
10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       4
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       0
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       8
194 Temperature_Celsius     0x0022   120   110   000    Old_age   Always       -       32
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   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   200   000    Old_age   Offline      -       0



ADA2
Code:
[root@freenas] ~# smartctl -A /dev/ada2
smartctl 6.3 2014-07-26 r3976 [FreeBSD 9.3-RELEASE-p31 amd64] (local build)
Copyright (C) 2002-14, 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   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   100   253   021    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       4
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       164
10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       4
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       0
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       9
194 Temperature_Celsius     0x0022   118   108   000    Old_age   Always       -       34
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   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   200   000    Old_age   Offline      -       0


ADA3
Code:
[root@freenas] ~# smartctl -A /dev/ada3
smartctl 6.3 2014-07-26 r3976 [FreeBSD 9.3-RELEASE-p31 amd64] (local build)
Copyright (C) 2002-14, 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   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   100   253   021    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       4
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       164
10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       4
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       0
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       9
194 Temperature_Celsius     0x0022   120   110   000    Old_age   Always       -       32
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   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   200   000    Old_age   Offline      -       0
Keep testing them, but so far so good.

They don't even have spinup times yet, so cycle them a bit and keep testing them.
 

Schuby

Dabbler
Joined
Apr 27, 2016
Messages
37
I've been working on a script to automate this burn-in process. The file is attached. Feedback is welcome. I don't recommend you run this on a production machine.


Built-in Safety Features:
  • The drive must exist
  • The drive must not be in use (according to gpart)
  • Will not start a second, simultaneous scan on the same drive
Logging Features:
  • All log files begin with the string "<DRIVE_MODEL>_<SERIAL_NUMBER>_<DATE>"
  • SMART details are saved to disk before and after the testing process
  • Log files generated to "at a glance" let you know which disks are in progress and which are completed.
Convenience Features:
  • Extensive automatic use of tmux results in "Fire and Forget" usability
  • Enables and disables RAW Disk I/O as needed, being aware of other concurrent tests (works, kind-of, still in beta)
  • tmux sessions named after drive name (da1, ada14, etc) so you know which drives are being tested
  • Running the script against a new drive will list all active tmux sessions (equivalent of running 'tmux ls')
Steps:
  1. Switch to bash
  2. Set save path
  3. Verify disk exists
  4. Get drive model number & serial number
  5. Verify disk not already in use (gpart)
  6. Verify disk not already under test
  7. Spawn tmux session. Name tmux session after disk device designation (ie. "da0")
  8. Create"In-Progress" status file
  9. Forcibly cancel previous SMART test
  10. Save SMART details to disk
  11. Start SMART short test. Write time stamp of completion to log file. Sleep until complete.
  12. Start SMART conveyance test. Write time stamp of completion to log file. Sleep until complete.
  13. Start SMART long test. Write time stamp of completion to log file. Sleep until complete.
  14. Enable RAW Disk I/O using sysctl
  15. Run destructive badblocks test (default settings)
  16. Start SMART long test. Write time stamp of completion to log file. Sleep until complete.
  17. Save SMART details to disk
  18. Remove "In-Progress" Status File
  19. Create "Completed" Status File
  20. If no other "In-Progress" files exist, then reset the RAW Disk IO flag to zero and remove the RAW Disk IO Flag file
  21. Done
How to run it:
  1. Give the server a drive to hold files. I mounted a USB drive and set it up as a standard volume with this path: /mnt/SystemDataset
  2. Put the script in /mnt/SystemDataset
  3. Open the script and edit the variable 'Save_Path' to fit your environment
  4. Set the script to be executable
  5. Run it like this:
    1. ./drive_burn_in.sh <drive_name>
    2. ./drive_burn_in.sh da1
During the writing of this post, I have 12 drives simultaneously running this very script on a non-production server.

This there an updated version of this script for 9.10? I hit some errors involving the 'sleep until' portion. I'll try and get a log when possible.

Edit: Here is the error:

Code:
/mnt/SystemDataset/drive_burn_in.sh: line 105: $Save_File: ambiguous redirect


Edit 2: Also it seems if the Conveyance test is not support, then it errors out:

Code:
Performing Conveyance Self-Test on HGST HGST S/N:PL2331LAH0VXJJ
Sleeping until:
/mnt/SystemDataset/drive_burn_in.sh: line 105: $Save_File: ambiguous redirect
Failed conversion of ``'' using format ``%a %b %d %T %Z %Y''
date: illegal time format
usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
            [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]
SMART conveyance test completed


Despite it stating "Performing Long-Test", checking the status of the test using "smartctl -l selftest /dev/ada1" indicates no test is currently operating.

Edit 3: Ok it seems that HGST drives do NOT show that a long test is in progress. I know this because when I force cancel any test on HGST drives, it does show that a long test was aborted. For some reason smartctl doesn't display it as in progress. So it seems to be working except for the '$Save_File: ambiguous redirect' issue.
 
Last edited:
Joined
Apr 9, 2015
Messages
1,258
HGST drives do not have a conveyance test so it seems. If you do a smartctl -a /dev/??? you will get a listing of what is actually supported.

For instance a WD green gets:

Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.

A HGST NAS drive gets:

Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.

Honestly a script really isn't much use when you are doing the smart tests since an arrow up a backspace and changing one number is all it takes to start the next test. Plus if you are doing the tests through SSH it's simple to copy and paste is just as easy when it comes to the actual badblocks. Shoot I did the last drives I got from about 100 miles away using my OpenVPN connection from my tablet and JuiceSSH. Unless you are doing a ton of drives a script is more likely to cause issues and you will always need to tailor it to your system/drives as you have already seen since the drives don't support a test and then the script fails.
 

Schuby

Dabbler
Joined
Apr 27, 2016
Messages
37
HGST drives do not have a conveyance test so it seems. If you do a smartctl -a /dev/??? you will get a listing of what is actually supported.

For instance a WD green gets:

Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.

A HGST NAS drive gets:

Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.

Honestly a script really isn't much use when you are doing the smart tests since an arrow up a backspace and changing one number is all it takes to start the next test. Plus if you are doing the tests through SSH it's simple to copy and paste is just as easy when it comes to the actual badblocks. Shoot I did the last drives I got from about 100 miles away using my OpenVPN connection from my tablet and JuiceSSH. Unless you are doing a ton of drives a script is more likely to cause issues and you will always need to tailor it to your system/drives as you have already seen since the drives don't support a test and then the script fails.

Makes sense. I was using the script because the long tests were schedule to end early morning and wanted to have it automatically move to badblocks.

Any ideas why smartctl doesn't display that a test is in progress (for HGST) when it really is?
 
Joined
Apr 9, 2015
Messages
1,258
Every drive is a little different in how it handles and codes a test in progress. By doing a smartctl -a /dev/??? you can scroll through and see the test status and approx percentage left.
 

PhilZJ81

Explorer
Joined
Mar 29, 2016
Messages
99
Sorry, noob here.

I'm trying to follow the instructions, all works great until after I run the tmux command.

when running
"
freenas# badblocks -ws /dev/ada0
"
badlocks gives this message:

badblocks: Value too large to be stored in data type invalid end block (5860522584): must be 32-bit value

These are brand new drives, I didn't configure anything on them.
Thanks!
 

Schuby

Dabbler
Joined
Apr 27, 2016
Messages
37
Sorry, noob here.

I'm trying to follow the instructions, all works great until after I run the tmux command.

when running
"
freenas# badblocks -ws /dev/ada0
"
badlocks gives this message:

badblocks: Value too large to be stored in data type invalid end block (5860522584): must be 32-bit value

These are brand new drives, I didn't configure anything on them.
Thanks!

Did a quick search for you and it seems this might help: https://forums.freenas.org/index.php?threads/badblocks-test-for-wd60efrx.26708/
 

PhilZJ81

Explorer
Joined
Mar 29, 2016
Messages
99

Wonderful, much appreciated! I'm re-running the long SMART tests again, and when they complete tomorrow, I'll start the badlocks using
badblocks -b 4096 -v /dev/sda

I'm still somewhat concerned about my high drive temperatures though. Currently i'm at 50C, 49C, 44C, 43C, 48C, 50C. What's interesting to me, is the 2 drives that are cooler have a different Serial number. They start with NCG, the others start with K1G.

Also, I'm not sure I understand why they are numbered in the adaX list. The 2 drives in ada2 and ada3 are the 2 drives with the NCG serial number and (unless I crossed my lines) they should be connected to the intel SATA 4 and 5 on my board.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Sorry, noob here.

I'm trying to follow the instructions, all works great until after I run the tmux command.

when running
"
freenas# badblocks -ws /dev/ada0
"
badlocks gives this message:

badblocks: Value too large to be stored in data type invalid end block (5860522584): must be 32-bit value

These are brand new drives, I didn't configure anything on them.
Thanks!
For large drives you must choose a larger block size. It's advantageous for all sizes, since the test is faster.
 

PhilZJ81

Explorer
Joined
Mar 29, 2016
Messages
99
thanks Eric, ya I'll do that tomorrow when my SMART test completes again..

I forgot, do you guys recommend I run the badlocks simply through the web Interface (chrome browser) from another computer? or should I use a monitor on the freeNAS box and open up shell (option 9). thanks
 

Schuby

Dabbler
Joined
Apr 27, 2016
Messages
37
thanks Eric, ya I'll do that tomorrow when my SMART test completes again..

I forgot, do you guys recommend I run the badlocks simply through the web Interface (chrome browser) from another computer? or should I use a monitor on the freeNAS box and open up shell (option 9). thanks

Newb here as well, doing this for the first time. I open a putty session for each hard drive and run badblocks within a tmux terminal, that way I can monitor each one and if I lose connection they continue to run. Here's what I did:

Code:
tmux new-session -s ada0 -d
tmux new-session -s ada1 -d
tmux new-session -s ada2 -d
tmux new-session -s ada3 -d
tmux new-session -s ada4 -d


Obviously replacing ada0-4 with your drive names. (And also do it more or less depending how many you have).

Then check if all of your TMUX sessions are running:

Code:
tmux ls


Then in each putty window using SSH, I attached to each one:

Code:
tmux attach -t ada0


Obviously replacing each drive name in each window.

Then in each window I run badblocks.

In the end, my desktop looks like this:

CQwTv6r.png


If you want to see the process information seen in the sixth window, use:

Code:
top -zISmio
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Newb here as well, doing this for the first time. I open a putty session for each hard drive and run badblocks within a tmux terminal, that way I can monitor each one and if I lose connection they continue to run. Here's what I did:

Code:
tmux new-session -s ada0 -d
tmux new-session -s ada1 -d
tmux new-session -s ada2 -d
tmux new-session -s ada3 -d
tmux new-session -s ada4 -d


Obviously replacing ada0-4 with your drive names. (And also do it more or less depending how many you have).

Then check if all of your TMUX sessions are running:

Code:
tmux ls


Then in each putty window using SSH, I attached to each one:

Code:
tmux attach -t ada0


Obviously replacing each drive name in each window.

Then in each window I run badblocks.

In the end, my desktop looks like this:

CQwTv6r.png


If you want to see the process information seen in the sixth window, use:

Code:
top -zISmio
Close, but do yourself a favor and use only a single tmux session with multiple subwindows. tmux does stand for Terminal MUltipleXer. ;)

Check the manpage for the keyboard commands you need.
 

Schuby

Dabbler
Joined
Apr 27, 2016
Messages
37
Close, but do yourself a favor and use only a single tmux session with multiple subwindows. tmux does stand for Terminal MUltipleXer. ;)

Check the manpage for the keyboard commands you need.

Oh I'm will aware of using one tmux session, I just didn't like it :P
 
Top