Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.
Resource icon

Disk failure LEDs for Supermicro SAS backplanes 0.3

Many hot-swap backplanes have disk-failure LEDs that can be turned on when a disk fails. Unfortunately, there doesn't seem to be a standard mechanism to do this, and FreeNAS doesn't have any built-in support for this feature.

Using inspiration from a couple of other sources (and by inspiration, I mean I blatantly ripped off, and tweaked to work with FreeNAS), I've modified a script that will light up the disk-failure LEDs on, at least, Supermicro SAS2 expander backplanes. I don't have any other manufacturer's SAS2 expander blackplane to test with, and it probably wouldn't work with a SAS3 backplane without changing the sas2ircu commands to sas3ircu.

Run this script as a cron job at whatever interval you like--I'd think somewhere between every 15 minutes and every hour would be reasonable. It will check your pool and, if it's healthy, write out a file mapping disk IDs to backplane locations. If the pool isn't healthy, it will send an email report to a specified email address, and light up the disk-failure LED. The command syntax is /path/to/zpscan.sh poolname [ email ].

The script contains logic to send an email notification of pool issues, but by default it's disabled since FreeNAS sends those anyway. If you want this script to send emails as well, either change send_email to "YES" on line 11, or specify an email address on the command line.

Download the script, save it to any location you like on your server, and rename it from zpscan.sh.txt to zpscan.sh. Then make it executable: chmod +x zpscan.sh.

This shouldn't hurt anything, but it's seen very little testing. Use at your own risk.

The script I started with is here. Syntax to translate gptid to disk ID is thanks to fixer.sh.
Author
danb35
Downloads
649
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from danb35

Latest updates

  1. Moved hosting to Github

    No changes to the code, but I've moved hosting of this script to Github. The button will take...
  2. Removed email logic

    For reasons unclear to me, the email logic I'd added seemed to break things, so I've removed it...
Top