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 www.shellcheck.net , 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.
    Repository: github.com/Spearfoot/FreeNAS-scripts
    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 smart_report.sh ). Here is a list of what's available:
  • get_hdd_temp.sh : List current CPU and hard drive temperatures
  • get-system-temps.pl : Perl script with the same functionality as get_hdd_temp.sh above
  • save_config.sh : Save copy of configuration file
  • save_config_enc.sh : Save copy of configuration file and optionally email it to yourself as an encrypted tarball
  • set_hdd_erc.sh : Configure TLER/ERC setting on drives
  • smart_report.sh : Email a SMART report
  • ups_report.sh : Email a UPS report
  • zpool_report.sh : Email a pool report
  • Repository: github.com/Spearfoot/disk-burnin-and-testing
    Contains disk-burnin.sh , 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! :)
    Repository : github.com/Spearfoot/scripts-for-using-rsync
    Contains a pair of shell scripts for using rsync:
  • rsync-invoke.sh : Runs rsync directly, with options known to work well on FreeNAS.
  • rsync-module.sh : 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:
    This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies. Accept Learn more…