Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.
Github repository for FreeNAS scripts, including disk burnin and rsync support

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

I've pushed an update to the script on GitHub that fixes the date parsing problems introduced by TrueNAS 12.0 release.

Repository is here:
  • Improved the GitHub 'Read Me' file
  • Dry runs are no longer the default setting
  • Changed badblocks call to exit immediately on first error
  • Set logging directory to current working directory using pwd command
  • Reduced default tests from 5 to 3, so that we run:
    • Short SMART test
    • badblocks
    • Extended SMART test
I've added a new repository with two rsync-related scripts.
We now have support for SAS drives in the script, along with other enhancements to formatting, column width, drive vendor/brand/model/family information, etc.
I've made some improvements to this script, mainly:
  • Use the sqlite3 backup procedure to create the backup configuration file - this should eliminate any database lock contention problems.
  • Now backs up the password secret seed file in addition to the system configuration.
Email was 'broken' for the and scripts on the new FreeNAS 11.3-RELEASE, which it turns out is more fussy than earlier versions were about MIME encoding.

I've modified the code to accommodate the more stringent requirements by adding proper MIME boundaries and have tested on FreeNAS versions 11.2-U8, 11.3-RELEASE, and 11.3-U1.

Please let me know if you have any problems with the updated scripts.
The 'sendmail' command used in several scripts is 'broken' as of FreeNAS version 11.3-RELEASE. I have submitted a bug report and will post here again when/if the bug is fixed and I've modified the GitHub repository.
zpool output changed from FreeNAS version 11.0 to 11.1, breaking our parsing of the scrubErrors and scrubDate variables in the script. Added a conditional to check the FreeNAS version and parse these values accordingly.

We obtain the FreeBSD version using uname, as suggested by user Chris Moore here on the FreeNAS forum.

uname -K gives 7-digit OS release and version, e.g.:

FreeBSD 11.0 --> 1100512
FreeBSD 11.1 --> 1101505
Added a Perl script ( to my FreeNAS-scripts repository on GitHub. The script provides functionality similar to the shell script, including optional support for IPMI.
The title pretty much says it all.

I've posted a new script on GitHub ( named

It's similar to the older in that its primary function is to copy your configuration file onto your pool. But if you set it up to do so this version goes further and will also:
  • Validate the configuration file with sqlite3 pragma integrity_check;
  • Create a compressed tarball containing the configuration file
  • Encrypt the tarball and email it to you as a MIME-encoded attachment
  • Like
Reactions: SlackerDude