Small Computer Systems Interface (SCSI)
The Small Computer Systems Interface (SCSI), here referred to as a protocol, is in fact a set of standards that define all the needed components for the communication between an initiator and a storage system. These standards define the physical requirements, such as the electrical and optical, as well as the logical interfaces and the commands and how the negotiation is initiated and performed.
The SCSI protocol was initially implemented for communication between the operating system and the local storage, and later it was used for communication with storage that’s reachable over a network.
Initially, the communication took place over a parallel SCSI bus. The parallel SCSI bus is half-duplex, which means at a given moment only a single device can communicate: either a request can be sent or a response can be received. Because commands are exchanged over this channel, data blocks and status messages, being half-duplex, might cause some commands to be dropped while the channel is busy, which creates a multidrop environment. The parallel SCSI bus had limitations such as the following in the latest version:
- A maximum of 16 devices
- A maximum of 320Mbps of shared channel bandwidth
- Half-duplex
- A maximum length of 25 meters (82 feet)
As already mentioned in the overview of the storage protocols, there are other transports for the SCSI protocol that allow its usage as a block-based protocol over larger distances and bigger infrastructures.
The SCSI protocol itself has the task of performing two major functions:
- To form and exchange units that contain commands, blocks of data, and status messages
- To implement a mechanism that allows the blocks of data to be reassembled in the correct order at the destination of the communication
The SCSI protocol sits between the operating system and the peripheral resources. Through the operating system, the applications are capable of using the SCSI protocol for communication with the storage devices and other peripheral units, such as printers.
The architecture of the SCSI protocol is shown on Figure 10-4. The enhanced parallel port (ECP) is a standard signaling method for bidirectional parallel communication between a computer and peripheral devices. The figure illustrates that the communication of the SCSI protocol can happen on different transport mediums, such as ECP and IP networks.
Figure 10-4 SCSI Protocol Architecture
The SCSI architecture defines the communication between the initiators and the targets. As initially that communication was taking place over a parallel SCSI bus, the architecture was defined for such a transport. Later, with the use of the iSCSI and FC Protocol, the commands’ definition continued to be used with some minimal changes.
The SCSI commands are sent in a Command Descriptor Block (CDB), which consists of an operation code and command-specific parameters. In general, the initiator starts the communication with a request, which is a CDB, to the target. Then the target returns a status message. There are more than 60 SCSI commands, grouped into four types: N (non-data), W (write from initiator to target), R (read data), and B (bidirectional).
The SCSI protocol uses a specific addressing, called a SCSI ID, to support the communication between the different participants. For the purposes of better utilization and flexibility, the physical storage is divided into logical units. Because of this, for the storage systems it is not enough to use only a SCSI ID as a form of identification, as it points to the physical devices only. It also needs to identify a specific logical unit on top of the physical storage. For this, the Logical Unit Numbers (LUNs) are used, which are the numbers that identify the logical units. In this way, the combination between the SCSI ID and the LUN forms the address used in the SCSI communication.