Github repository for FreeNAS scripts, including disk burnin and rsync support

Github repository for FreeNAS scripts, including disk burnin and rsync support

Github repository for FreeNAS scripts, including disk burnin and rsync support

I am maintaining three repositories on GitHub for these purposes:
  • Administration and reporting
  • Disk burn-in
  • Rsync
These are all POSIX-compliant shell scripts that I've 'linted' at, so they're free of syntax errors and all seem to work well. I use slightly modified version on my systems.

I've recently begun adding Perl code to the repository as well.


Contains my versions of @Bidule0hm's code from his "Scripts to report SMART, ZPool and UPS status, HDD/CPU T°, HDD identification and backup the config" thread. My motivation in setting this up was to have a readily accessible place where users can find them -- @Bidule0hm 's original thread is so long that it's unwieldy trying to navigate it looking for the latest suggested modifications. I've made a few bug fixes and enhancements (e.g., supporting 18-character serial numbers vs. only 15 in the original version of Here is a list of what's available:
  • : List current CPU and hard drive temperatures
  • Perl script with the same functionality as above
  • : Save copy of configuration file
  • Save copy of configuration file and optionally email it to yourself as an encrypted tarball
  • : Configure TLER/ERC setting on drives
  • : Email a SMART report
  • : Email a UPS report
  • : Email a pool report

Contains, a shell script for testing/burning-in drives. This was inspired by @qwertymodo's "How To: Hard Drive Burn-In Testing" thread and by my being lazy. It's not specific to FreeNAS: I typically run it on an old Core 2 Duo system equipped with 8GB of RAM and a Dell H200 HBA running Ubuntu Sever 16.04.02 LTS. It queries the disk for the short and long SMART test durations, calculates the appropriate sleep periods, and then runs this series of operations:
  • SMART short test, sleeping until complete
  • badblocks -b 4096 -wsv -e 1 -o [bb data file] /dev/[device ID]
  • SMART long test, sleeping until complete
I will endeavor to keep these repositories up-to-date with bug fixes and suggested changes as time goes by... and everyone is welcome to submit pull requests, too! :)


Contains a pair of shell scripts for using rsync:
  • Runs rsync directly, with options known to work well on FreeNAS.
  • Runs rsync with the target being an rsync module on the remote server, using the same options as above.
Full description and examples are available on the GitHub repository.

Here are typical rsync module settings I use on my FreeNAS 11.2-U8 systems:
First release
Last update
5.00 star(s) 13 ratings

More resources from Spearfoot

Latest updates

  1. Improved the configuration backup script:

    This updated version creates a tarball containing a validated copy of the TrueNAS/FreeNAS...
  2. ZPool report script updated for use with TrueNAS 12.0

    I've pushed an update to the script on GitHub that fixes the date parsing...
  3. Changes to disk burn-in script

    Improved the GitHub 'Read Me' file Dry runs are no longer the default setting Changed badblocks...
  4. Added rsync script repository

    I've added a new repository with two rsync-related scripts.
  5. Announcing support for SAS drives in the SMART report script

    We now have support for SAS drives in the script, along with other enhancements...

Latest reviews

I burnin all my disks as a matter of course using this script, and I can confirm that it seems to work on SCALE 23.10.2
Thankyl you for your great and awesome work!
Great info. got files on my server and configured them and had the info within minutes. Neat info!
Nicely done, I appreciate the value of having important\useful scripts like this in 1 place, thank you for taking the time to put these together.
Thanks for sharing these usful scripts.
Useful scripts, especially the disk-burnin!
I tried these scripts out over the weekend and they all worked beautifully. Thank you for your hard work putting these together and sharing them with the community.
The scripts provide a nice overview on the status of your zpool and drives without extra requirements. I think they should have been part of the standard feature set of freenas.
Useful and convenient, also all in one place for reference.