SCSI Enclosure Services (SES & SES-2) Management
SCSI Enclosure Services, referred as SES or SES-2, depending on the revision level, is a command set that is used to manage and sense the state of the power supplies, cooling devices, displays, indicators, individual drives, and other non-SCSI elements installed in a fibre channel or SAS (host-attached) enclosure. Intelligent enclosures that connect to the host via a SCSI cable will normally speak the SAF-TE protocol.
The command set is defined as an ANSI specification, and utilizes the SCSI commands to obtain configuration information for the enclosure as well as reprogram it to light external indicator LEDs or audible alarms to inform the user about the health and maintenance information for attached RAID controllers and disk drives.
An enclosure services device (circuit board with CPU) typically manages all these enclosure elements (fans, power supplies, etc…) and communicates with the processor via application software.
Note that the “SCSI” in SCSI Enclosure Services refers to the protocol, and not any type of physical connection. Enclosures that connect via Fibre Channel and SAS cabling are classified as SCSI devices. They speak the SCSI command set, and use a serial SCSI interface. Traditional “SCSI” disk drives also use the SCSI protocol, but use parallel SCSI connectors.
SES devices will generally have the ability to flash firmware updates, but the mechanism for doing this is sometimes vendor/product specific.
ANSI-Defined SES Element Types and Description Table
Below is a table from the ANSI SES programming specification which shows how one might package the bytes to control aspects of a device. We will send a harmless command which will enable the fault light for a device in a particular slot. Every element type has a different 4-byte structure and options, so you should consult either the ANSI programming specification or your particular vendor’s documentation. Remember, an enclosure manufacturer is free to not support certain functions as well as add vendor-unique functionality.
To enable the request fault light, we must set bit 5 in byte #3 (i.e., 20 hex), so the wwxxyy sequence must be 000020.
As we are controlling the device element, we must send a 01 to indicate a disk device. For our example, we’ll select the third device in the enclosure (corresponding to element # 2).
Put it all together, and you would send out -EP20102000020.
If we were to send out -EP20102000200, this will turn off the fault light, but turn on the identify light (assuming one exists). Note that the fault light goes off because byte 3 (the yy field) has all zeros in it. The SES enclosure will stay in whatever state you put it in, until either the enclosure decides to override that state or power is reset to the enclosure. Everything is volatile. (There may be some exceptions for vendor-unique SES elements).