SAF-TE
# SAF-TE

In computer storage, SAF-TE (abbreviated from SCSI Accessed Fault-Tolerant Enclosure) is an industry standard to interface an enclosure in-band to a (parallel) SCSI subsystem in order to gain access to information or control for various elements and parameters. These include temperature, fan status, slot status (populated/empty), door status, power supplies, alarms, and indicators (e.g. LEDs, LCDs). Practically, any given SAF-TE device will only support a subset of all possible sensors or controls.

## Scope

Many RAID controllers can utilize a SAF-TE "activated" backplane by detecting a swapped drive (after a defect) and automatically starting a rebuild. A passive subsystem usually requires a manual rescan and rebuild.

A SAF-TE device (SEP) is represented as a SCSI processor device that is polled every few seconds by e.g. the RAID controller software. Due to the low overhead required, impact on bus performance is negligible. For SAS or Fibre Channel systems, SAF-TE is replaced by the more standardized SCSI Enclosure Services (SES).

The most widely used version was defined in the SAF-TE Interface Specification Intermediate Review R041497, released on April 14, 1997 by nStor (now part of Seagate Technology) and Intel.

## Command interface

Status requests are performed as READ BUFFER SCSI commands, enclosure action requests as WRITE BUFFER commands.

| Command type | Opcode | mandatory / optional | Command | Description |
| - | - | - | - | - |
| READ BUFFER | 00h | m | Read enclosure configuration | inquire about system components in the enclosure |
| READ BUFFER | 01h | m | Read enclosure status | inquire about operational status of enclosure components |
| READ BUFFER | 02h | o | Read usage statistics | fetch information about total usage time and number of power-cycles |
| READ BUFFER | 03h | o | Read device insertions | returns information on how many times a device has been inserted into each enclosure slot |
| READ BUFFER | 04h | m | Read device slot status | returns information on the current state of each slot |
| READ BUFFER | 05h | o | Read global flags | read global flags from processor |
| WRITE BUFFER | 10h | m | Write device slot status | updates state of the slots, essentially drives LEDs, alarms etc. |
| WRITE BUFFER | 11h | o | Set SCSI ID | set the SCSI ID of any device on the channel |
| WRITE BUFFER | 12h | m | Perform slot operation | prepare a slot for insertion or removal (electronically or mechanically) |
| WRITE BUFFER | 13h | o | Set fan speed | set rotational speed for each fan |
| WRITE BUFFER | 14h | o | Activate power supply | turn a power supply on or off |
| WRITE BUFFER | 15h | m | Send global flags | send global flags to processor (audible alarm; indicators for global failure, global warning, enclosure power, fan/cooling failure, power failure, drive failure, drive warning, array failure, array warning; enclosure lock; enclosure identification) |
