Should I create a Resource for my fully-automated HDD/SSD burn-in scripts?

JTT0

Explorer
Joined
Dec 21, 2013
Messages
82
Hi all,
I have written a couple dozen scripts to completely automate the entire "Drive Burn-In" process down to a simple bash script that you run locally which will bundle the scripts into a ZIP, upload them to your server, unzip them and then execute burn-in on either a list of drives you provide or all drives available. This process will automatically setup a TMUX session and split the window for each drive to burn-in individually in parallel. It will also discern between HDD and SSD to run different steps. This Burn-In process was derived from over two dozen articles and processes including all the resources already created here. It has taken me a few weeks to test it out properly (from MacOS but should also work for Linux). Please note that there are likely to be a few minor changes required to process this Bash script from Windows such as installing "Git Bash", etc.

If there is an appetite for a completely automated Burn-In script, I'll go through the effort to create a resource and upload them to GitHub, etc. for consumption.

High-Level Burn-In Process:
In parallel on all HDD/SSD/NVME drives, run sequentially:
  1. General Tests Part One
    1. Manufacturer's conveyance test (smartctl -t conveyance /dev/adaX)
    2. SMART short test (smartctl -t short /dev/adaX)
    3. SMART long test (smartctl -t long /dev/adaX)
    4. Print Result (smartctl -A /dev/adaX)
    5. Basic Imaging write test (dd if=/dev/zero of=/dev/da${n} bs=1048576)
    6. Print Result (smartctl -A /dev/adaX)
    7. Basic Imaging Read Test (dd if=/dev/da${n} of=/dev/null bs=1048576)
    8. Print Result (smartctl -A /dev/adaX)
  2. SSD Tests
    1. No unique steps at this time
  3. HDD Tests
    1. Basic Imaging Write and Read Tests in parallel (dd if=/dev/zero of=/dev/da${n} bs=1048576 / dd if=/dev/da${n} of=/dev/null bs=1048576)
    2. Print Result (smartctl -A /dev/adaX)
    3. BadBlocks Destructive Read-Write test (badblocks -b 4096 -wsv /dev/adaX)
    4. Print Result (smartctl -A /dev/adaX)
  4. General Tests Part Two
    1. Manufacturer's conveyance test (smartctl -t conveyance /dev/adaX)
    2. SMART short test (smartctl -t short /dev/adaX)
    3. SMART long test (smartctl -t long /dev/adaX)
    4. Print Result (smartctl -A /dev/adaX)
Example Script Execution Commands:
All Params:
bash ./upload_to_freenas_and_run_burnin.sh <HOST_IP_ADDR> <PORT> <DRIVE_LIST:all available drives> <ZERO_DRIVES:false> <TMUX_SESSION_SUFFIX:""> <END_TMUX_SESSION_ON_DETACH:false>
All Drives With Defaults: bash ./upload_to_freenas_and_run_burnin.sh <HOST_IP_ADDR> <PORT>
All Drives With Defaults Specified: bash ./upload_to_freenas_and_run_burnin.sh <HOST_IP_ADDR> <PORT> "<DRIVE_LIST>" false "" false
Drive List: bash ./upload_to_freenas_and_run_burnin.sh <HOST_IP_ADDR> <PORT> "/dev/da0 /dev/da1 /dev/da2"
Drive List With Zeros After Testing (SMR Performance Adjustment): bash ./upload_to_freenas_and_run_burnin.sh <HOST_IP_ADDR> <PORT> "/dev/da0 /dev/da1 /dev/da2" true

Note: This is still an ongoing work-in-progress and the SMART reports above may be replaced by something more specific to the previous test, etc.

Please "Like" this post if you'd like these scripts to be made available.

Thanks!
 
Last edited:

JTT0

Explorer
Joined
Dec 21, 2013
Messages
82
@jgreco and @qwertymodo

Parts of this process are based on your Resources here and here. I would love feedback on changes/adjustments to further improve this script!

In addition, with your blessings as well, I could combine sections of your Resources to create a single Resource for all this information. Although, I would likely remain solely focused on HDD/SSD Burn-In and not SYSTEM/CPU/RAM at least for the first iteration.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Feel free to create the Resource, more is almost always better. If you need help with the Resources section, just ping me and I'll see what I can do.
 

JTT0

Explorer
Joined
Dec 21, 2013
Messages
82
Hi @Ericloewe,
It seems that the interest in a Resource is quite minimal (150+ views but only 4 responses) so I am thinking that I may just make my scripts available on GitLab for consumption via a How-To Guide. If I have some spare time next weekend, I may revisit and see if the time spent making it as a Resource is actually going to benefit the community.

I would be glad to make a comprehensive Resource if the interest in this increases and I am able to get support from @jgreco and @qwertymodo to borrow portions of their Resources to make a single all-in-one resource. I don't want to step on any toes as any Resource I make would cover some of the same information.

I am also looking for any feedback on the top-level Burn-In process above for ways to improve it and/or whether it's even a good process to run. This was created from a few weeks of research across the internet and I am no expert on burning in hard drives, etc. by any means. I am just a Software Engineer that prefers to automate anything I can to prevent having to remember how to do it by hand in three years when I get new drives, etc.

P.S. To add, as my background is in Computer Engineering / Software Engineering, my documentation is generally very technical and may need some massaging if/when created as a Resource :)
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
The Resources don't have to be anything special. Even a short summary and a link to a git repo would make a good start. Come to think of it, a XenForo extension to integrate a Resource with a git repo would be kinda cool.
 

JTT0

Explorer
Joined
Dec 21, 2013
Messages
82
@Ericloewe - Sounds good! I'll put something together with what I have. I will probably just have it link out to GitLab for the time-being and add more details as time permits. My hope is that these scripts are useful to anyone looking to simplify the burn-in process. Come to think of it, these scripts could even provide benefit if provided with TrueNAS for anyone not looking to understand how to do it but just looking for a button to burn the drives in and provide results. I am not installing anything that is not already provided as part of TrueNAS as I wanted to keep from adding packages, etc.
 

JTT0

Explorer
Joined
Dec 21, 2013
Messages
82
As a quick update, I now have my scripts on GitHub and am putting together instructions, etc. to go along with it. I will then create a new TrueNAS Resource that wraps it back to the community.
 

JTT0

Explorer
Joined
Dec 21, 2013
Messages
82
From further testing of these scripts on new HDDs/SSDs I needed to burn-in, I had to make a few adjustments to get them to be generic. They still require you to define your user/host/port, etc. which is not necessary if you use an SSH config since it is redundant. I'll add these updates after publishing all of this.

At this point, I now have gained known necessary approvals and cleaned up the scripts in addition to making them work as drop-ins and bundles since my scripts are spread across multiple independent repositories. I am now adding some final touches in the scripts before publishing these repositories and TrueNAS resource very soon.
 
Last edited:

JTT0

Explorer
Joined
Dec 21, 2013
Messages
82
I had published these scripts to GitHub but never got around to creating a TrueNAS resource for it here so I will try to have that up this weekend. I apologize for the delay!
 
Top