[OpenIndiana-discuss] OI and chassis/jbod support?
Lucas Van Tol
catseyev9 at hotmail.com
Mon Jul 2 21:23:04 UTC 2012
It's actually hex; not binary, I'm not sure why I typed that wrong.
And I don't know how standard it is across devices, which is why I'm somewhat leery of spreading it around.
I think it should work on SES devices that support page 0x2, which should be almost all SES devices.
What I've used all sees the same offsets; etc and seems to work, but it's mostly LSI/SuperMicro, and one HP MSA I couldn't get to do what I wanted anyways (and that only showed 2 of the 4 enclosures)
INBLOB=$(sg_ses --page=0x2 --raw /dev/es/$SESDEV | sed "s,\([0-9af][0-9af]\)[^0-9af]*\([0-9af][0-9af]\)[^0-9af]*\([0-9af][0-9af]\)[^0-9af]*\([0-9af][0-9af]\)[^0-9af]*,\n\1 \2 \3 \4 ,g")
INBLOB=$(echo "$INBLOB" | grep [0-9])
$INBLOB should look like
00 00 00 00
00 00 00 00
01 00 00 00
01 00 00 00
...
01 00 00 00
?? ?? ?? ??
...
with an '01 00 00 00' for every slot in the device, in order. The first 2 rows may not be 00's, I think they are part of the expander status.
After that is other diagnostic information for the SES device; with some temps and other information. Without the --raw sg_ses will interpret those.
By changing the 01 00 00 00 to other values; and sending them as a control message to page 0x2 of the ses device you should be able to control the LED states.
##Current state values
OFFSTATE='01 00 00 00'
ONSTATE='01 00 00 20'
BLINKSTATE='01 00 02 00'
BOTHSTATE='01 00 02 20'
##To make changes to state
SETOFF='81 00 00 00'
SETON='81 00 00 20'
SETBLINK='81 00 02 00'
SETBOTH='81 00 02 20'
INBLOB=$(sg_ses --page=0x2 --raw /dev/es/$SESDEV | sed
"s,\([0-9af][0-9af]\)[^0-9af]*\([0-9af][0-9af]\)[^0-9af]*\([0-9af][0-9af]\)[^0-9af]*\([0-9af][0-9af]\)[^0-9af]*,\n\1
\2 \3 \4 ,g")
INBLOB=$(echo "$INBLOB"|grep '[0-9]')
##Modify OUTBLOB to change the state of any LED's you want to update; than push the modified blob back to the SES device.
echo "$OUTBLOB" | sg_ses --page=0x2 --control --data=- /dev/es/$SESDEV
-Lucas Van Tol
> From: dswartz at druber.com
> To: openindiana-discuss at openindiana.org
> Date: Mon, 2 Jul 2012 17:03:14 -0400
> Subject: Re: [OpenIndiana-discuss] OI and chassis/jbod support?
>
> True enough. Honestly though, I've got a small number of disks, I just
> don't want to have to be bothered figuring out which drive is where if
> something is dying :)
>
> -----Original Message-----
> From: Lucas Van Tol [mailto:catseyev9 at hotmail.com]
> Sent: Monday, July 02, 2012 4:30 PM
> To: openindiana-discuss at openindiana.org
> Subject: Re: [OpenIndiana-discuss] OI and chassis/jbod support?
>
>
> I think the only reason to use mine would be if you didn't like/couldn't use
> sas2ircu for some reason (used by diskmap.py).
> I didn't have much luck turning on locator LED's on failed drives using
> sas2ircu; which is why I had used sg_ses and sg_vpd instead.
>
> -Lucas Van Tol
>
>
> > Date: Mon, 2 Jul 2012 15:29:00 -0400
> > From: dswartz at druber.com
> > To: openindiana-discuss at openindiana.org
> > Subject: Re: [OpenIndiana-discuss] OI and chassis/jbod support?
> >
> >
> > Lucas, thanks for the sg utils tip - I think I will go with the
> > diskmap.py Rich suggested - it worked pretty much out of the box, so I
> > needn't hack on anything else for now...
> >
> > _______________________________________________
> > OpenIndiana-discuss mailing list
> > OpenIndiana-discuss at openindiana.org
> > http://openindiana.org/mailman/listinfo/openindiana-discuss
>
> _______________________________________________
> OpenIndiana-discuss mailing list
> OpenIndiana-discuss at openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss
>
>
> _______________________________________________
> OpenIndiana-discuss mailing list
> OpenIndiana-discuss at openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss
More information about the OpenIndiana-discuss
mailing list