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

Western Digital Drives - The Preferred Drives of FreeNAS and TrueNAS CORE
This updated version creates a tarball containing a validated copy of the TrueNAS/FreeNAS configuration database along with the password secret seed encryption file. This makes it better suited to restoring the configuration than simply having a copy of the configuration database.

Repository is here: https://github.com/Spearfoot/FreeNAS-scripts
  • Like
Reactions: melloa
I've pushed an update to the zpool_report.sh script on GitHub that fixes the date parsing problems introduced by TrueNAS 12.0 release.

Repository is here: https://github.com/Spearfoot/FreeNAS-scripts
  • 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 smart_report.sh 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 smart_report.sh and zpool_report.sh 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 zpool_status.sh 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.:

Code:
FreeBSD 11.0 --> 1100512
FreeBSD 11.1 --> 1101505
Added a Perl script ( get-system-temps.pl) to my FreeNAS-scripts repository on GitHub. The script provides functionality similar to the get_hdd_temp.sh shell script, including optional support for IPMI.
Top