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

Discussion - FreeNAS 10.x plugin for drive LED management

Status
Not open for further replies.

Arwen

Neophyte Sage
Joined
May 17, 2014
Messages
1,190
Note - Whence we have some more details, we can add this as an actual entry at bugs.freenas.org.

This subject came up in another thread;

https://forums.freenas.org/index.php?threads/supermicro-red-light-implimentation-plans.39262/

My idea was to have a frame work in place, (probably only on FreeNAS 10.x), that allows GUI access
to any drive LEDs. Perhaps blink, steady on, off and status. Each enclosure, HBA and possibly system
board would have to have it's own plugin. (Plugin in this context is GUI interface addition.)

Certain stock configurations could be stored for immediate use, and as examples for other configurations.
People who use custom configurations and want this feature, would have to write there own, (using examples
and a LED Plugin Developer's Guide).

This could actually help iXsystems when they need to migrate to new hardware for TrueNAS. They create
a plugin for the new HBA, (or SAS expander), and any new units sold use that.

Ideally, the actual plugin would be a text script, checking for needed executables before using them. Then
translating input parameters into a HBA command.

Thoughts?
 
Last edited:

Ericloewe

Not-very-passive-but-aggressive
Moderator
Joined
Feb 15, 2014
Messages
16,769
Sounds like an interesting approach, especially a handful of combinations encompass nearly all users (who might benefit from this). LSI SAS HBAs plus sas2ircu and sas3ircu with LSI expanders seem to almost always work.
 

Arwen

Neophyte Sage
Joined
May 17, 2014
Messages
1,190
Thinking about it more, 2 separate types of configuration probably need to be supported.

First type would be manual setup using plain text file(s). One part would describe what this
server can do, On/Off, or On/Blink/Off, and which drive ports are covered. Then the next
part would be some commands to perform the task. Probably a single line for each function,
for each disk. Clumsey, but doable. Meaning if we can do On/Off for 8 drives, we would
need 16 command lines. If it was On/Blink/Off, then 24 command lines.

Second type would be more for integrators. Possibly a more full blown scripting where the
input is a SATA/SAS controller number with drive slot. The script figures it out and does
the appropriate thing. If a drive slot is not covered, return an error code. More for packaged
systems, that don't have random hardware.

The first type would be useful for FreeNAS uses, since we could create a configuration that
supports 2 or 3 SAS/SATA controllers and various disk layouts. Second type would be for
TrueNAS or more standardized builds, (for example FreeNAS Mini or certain pre-configed
SuperMicro builds).
 
Last edited:

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Do you know why FreeNAS doesn't allow for controls like this but TrueNAS does?

The answer is simple.. you have to handle it based on your hardware. Every system's setup.. the choice of SAS controller, SAS expanders (if used) as well as the lights that are supported (if any) all play a part. For example, in TrueNAS I can issue commands like "
setobjstat /dev/ses0 0x2 0x80 0x00 0x00 0x20" and turn the light on for a TrueNAS box. It only works for some hardware models of TrueNAS though, and the command will not work on my FreeNAS that has similar (but not identical) hardware to TrueNAS.

Unfortunately there is no way to make this stuff work for every system with even a good degree of certainty unless you control the hardware explicitly.

So I wish you luck on this endeavor, but I think you are underestimating the level of complexity that you are going to get involved in.
 

Arwen

Neophyte Sage
Joined
May 17, 2014
Messages
1,190
Actually it's not as hard as you think.

Basically a GUI hook and text file description for hardware abstraction of the function.
If the text file exists, and references a disk in the GUI, the GUI could display a LED
button. User presses, it runs the command referenced in the text file to perform the action,
(On, Off, or Blink).

With FreeNAS 10 having a fully functional CLI menu system, it's probably easier to
implement LED controls there first.

I would guess FreeNAS by default would have nothing setup. Thus, no additional
column for LED action and status. Only advanced users would bother to implement.
And even some of those would only implement this IF someone else had already done
so, (for a pre-canned configuration).
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Yep, what you want is a standardised interface (LED_ON(), LED_OFF, LED_BLINK(), ...) and the user can write a specific file that will be used by the GUI through this interface (when you click the LED on button in the GUI it calls LED_ON() in your file and LED_ON() will do whatever it needs to do to power on the LED (that's the part you write in the file), etc...) ;)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'd like to clarify something. I would love to have this feature on my chassis. The problem is that every chassis out there has different requirements. It's not like there's a very specific spec that everybody follows that makes it always work for everyone. I can turn the lights on and off on my hobbled together custom setup. That makes me very happy. But, if I do this on a true 100% Supermicro system, it doesn't work at all (in one system I tested it caused a panic... whoops). Then you have lots of other companies besides an all-supermicro system. What about Dell servers? What about HP servers? What about if its different cards? What about different SAS backplanes?

So the short and skinny is that there is no sure-fire way to figure out in software what all of the valid and possible combinations for commands are, then make them all work. And considering the fact that trying it on a system that I thought it would work on, and it caused a panic, I'm more than happy to recommend never, ever trying to do this. If someone can fat-finger a line of code, or someone can fat-finger a configuration that you create for your precise system, and cause a system panic... well... that's not the world I want to live in or deal with. Crashing out a system at a time when you're very likely to be trying to replace one or more disks is NOT the way to go if you actually care about your data.
 

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,214
Understood and totally agree that there does not seem to be any "silver bullet" that would fit all hardware scenarios. With that said, it could be an item that is only available under certain conditions. Say like a supported HBA is detected. Thinking of it along the lines of IPMI, the gui option is only presented if a compatible IPMI/BMC is detected; otherwise the item is not shown. I know this is over-simplifying and there are lots of other considerations, but it sure would be nice to have.

I haven't dug into this too much as of yet, since I am in the midst of performing a burn in of my hard drives. But, will for sure be willing to try when I do have time.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Or just hide the thing by default so fat-fingered users don't do something stupid... :)
 

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,214
In that case, a lot of things should be hidden to prevent stupidity.

I personally just close my eyes once I log into the GUI and start banging away just to make sure I am not tempted by something I see and decide to click on it... o_O
 

Visseroth

Senior Member
Joined
Nov 4, 2011
Messages
520
Mirfster, funny! Seriously!
I thought I'd wake this thread back up and see if there was any progress?
I just had a drive drop out of my pool after replacing my old hardware so I thought I'd try to light up the LED on the bay of the drive so I know for sure which bay it is and when I run "sas2ircu list" I get...
Code:
Version 20.00.00.00 (2014.09.18)
Copyright (c) 2008-2014 LSI Corporation. All rights reserved.

SAS2IRCU: No Controllers Found.


Current build is a X10SRH-CF MB utilizing the onboard Broadcom 3008 SAS3 controller plugged into a SAS2-846EL1 AND SAS2-826EL1 expander
 

Ericloewe

Not-very-passive-but-aggressive
Moderator
Joined
Feb 15, 2014
Messages
16,769

Visseroth

Senior Member
Joined
Nov 4, 2011
Messages
520
yea, took me a bit, but finally figured it out and managed to get the red light of my choosing to flash.
 

sfcredfox

Senior Member
Joined
Aug 26, 2014
Messages
319
I was able to get this to work with my SuperMicro backplanes, but not the HP enlcosures (MSA70/D2700). HP probably does some proprietary crap with their controllers, or I'm just not smart enough to figure it out. It would be a very cool feature though for supported controllers/backplanes.
 

Ericloewe

Not-very-passive-but-aggressive
Moderator
Joined
Feb 15, 2014
Messages
16,769
I was able to get this to work with my SuperMicro backplanes, but not the HP enlcosures (MSA70/D2700). HP probably does some proprietary crap with their controllers, or I'm just not smart enough to figure it out. It would be a very cool feature though for supported controllers/backplanes.
Try sescontrol or sesutil or whatever it's called.
 

sfcredfox

Senior Member
Joined
Aug 26, 2014
Messages
319
Try sescontrol or sesutil or whatever it's called.
Dude, you rock.

it's SESUTIL.

I used:
Code:
sesutil map

Code:
sesutil locate -u /dev/ses1 da20 on
sesutil locate -u /dev/ses1 da20 off

I have four enclosures counting the backplane in the actual system, so it showed all four ses devices, drives, power supplies, fans, and some stuff I couldn't make out.

It would do smoking cool if there was not only a plugin OP is talking about, but also to gather some of that SES data and show it some where.
 

Ericloewe

Not-very-passive-but-aggressive
Moderator
Joined
Feb 15, 2014
Messages
16,769
Dude, you rock.
You can thank Allan Jude and Michael W. Lucas for that one, it's in the Advanced ZFS book. Both of the books are worth a purchase, especially the advanced one.
 

sfcredfox

Senior Member
Joined
Aug 26, 2014
Messages
319
Did anyone do anything gui related with this idea?

I saw concerns that differing hardware might make it not work, which ideas were presented to allow users to account for their specific hardware or hiding the option for those it didn't apply to.
 
Status
Not open for further replies.
Top