From Citizendium
Jump to: navigation, search
This article is developing and not approved.
Main Article
Definition [?]
Related Articles  [?]
Bibliography  [?]
External Links  [?]
Citable Version  [?]
This editable Main Article is under development and subject to a disclaimer.

SCSI (Small Computer System Interface) is a set of standards for physically connecting and transferring data between computers and peripheral devices. The SCSI standards define commands, protocols, and electrical and optical interfaces. SCSI is most commonly used for hard disks and tape drives, but it can connect a wide range of other devices, including scanners and CD drives. The SCSI standard defines command sets for specific peripheral device types; the presence of "unknown" as one of these types means that in theory it can be used as an interface to almost any device, but the standard is highly pragmatic and addressed toward commercial requirements.

  • SCSI is an intelligent interface: it hides the complexity of physical format. Every device attaches to the SCSI bus in a similar manner
  • SCSI is a peripheral interface: up to 8 or 16 devices can be attached to a single bus. There can be any number of hosts and peripheral devices but there should be at least one host.
  • SCSI is a buffered interface: it uses hand shake signals between devices, it can transfer only real data and does no error checking and correction. All those are done in a buffer.
  • SCSI is a peer to peer interface: communication can be from host to host, host to a peripheral device, peripheral device to a peripheral device

SCSI is most commonly pronounced "scuzzy".

SCSI interfaces

SCSI is available in a variety of interfaces. The first, still very common, was parallel SCSI (also called SPI). It uses a parallel electrical bus design. The traditional SPI design is making a transition to Serial Attached SCSI (SAS), which switches to a serial point-to-point design but retains other aspects of the technology. iSCSI drops physical implementation entirely, and instead uses TCP/IP as a transport mechanism.

SCSI interfaces have traditionally been included on computers from various manufacturers for Windows, Mac and Linux environments. However, with the advent of SAS and SATA drives, motherboard manufacturers have moved SCSI connectors off of the board replacing them with the aforementioned connectivity. A handful of companies still market their SCSI interface connectivity for PCIe and PCI-X based motherboards.

Connector information: See SCSI connector

Parallel SCSI

Interface Alternative
Connector Width
Clock[1] Maximum
Throughput[2] Length
(single ended)[3]
Length LVD Length HVD Devices[4]
SCSI-1 Narrow SCSI SCSI-1 (1986) IDC50; Centronics C50 8 5 MHz 5 MB/s 6 m NA 25m 8
Fast SCSI SCSI-2 (1994) IDC50; Centronics C50 8 10 MHz 10 MB/s 1.5-3 m NA 25m 8
Fast-Wide SCSI SCSI-2;
SCSI-3 SPI (1996)
2 x 50-pin (SCSI-2);
1 x 68-pin (SCSI-3)
16 10 MHz 20 MB/s 1.5-3 m NA 25m 16
Ultra SCSI Fast-20 SCSI-3 SPI IDC50 8 20 MHz 20 MB/s 1.5-3 m NA 25m 8
Ultra Wide SCSI SCSI-3 SPI 68-pin 16 20 MHz 40 MB/s 1.5-3 m NA 25m 16
Ultra2 SCSI Fast-40 SCSI-3 SPI-2 (1997) 50-pin 8 40 MHz 40 MB/s NA 12m 25m 8
Ultra2 Wide SCSI SCSI-3 SPI-2 68-pin; 80-pin (SCA/SCA-2) 16 40 MHz 80 MB/s NA 12m 25m 16
Ultra3 SCSI Ultra-160; Fast-80 wide SCSI-3 SPI-3 (1999) 68-pin; 80-pin (SCA/SCA-2) 16 40 MHz DDR 160 MB/s NA 12m NA 16
Ultra-320 SCSI (2002) 68-pin; 80-pin (SCA/SCA-2) 16 80 MHz DDR 320 MB/s NA 12m NA 16
Ultra-640 SCSI (2003) 68-pin; 80-pin 16 160 MHz DDR 640 MB/s  ?? 16

Other SCSI interfaces

Interface Alternative
Connector Width
Clock[1] Maximum
Throughput[2] Length[3] Devices[4]
SSA 1 200 MHz 40 MB/s[5][6] 25 m 96
SSA 40 1 400 MHz 80 MB/s[5][6] 25 m 96
FC-AL 1Gb 1 1 GHz 1 Gb/s (100 MB/s)[7][6] 500m/3km[8] 127
FC-AL 2Gb 1 2 GHz 2 Gb/s (200MB/s)[7][6] 500m/3km[8] 127
FC-AL 4Gb 1 4 GHz 4 Gb/s (400MB/s)[7][6] 500m/3km[8] 127
SAS 1 3 GHz 3 Gb/s (300MB/s)[7][6] 6 m 16,256[9]
iSCSI Implementation- and network-dependent

SCSI cabling

Internal SCSI cables are usually ribbon cables that have multiple 68 pin or 50 pin connectors. External cables are shielded and only have connectors on the ends.


iSCSI preserves the basic SCSI paradigm, especially the command set, almost unchanged. iSCSI advocates project the iSCSI standard, an embedding of SCSI-3 over TCP/IP, as displacing Fibre Channel in the long run, arguing that Ethernet data rates are currently increasing faster than data rates for Fibre Channel and similar disk-attachment technologies. iSCSI could thus address both the low-end and high-end markets with a single commodity-based technology.

Serial SCSI

Four recent versions of SCSI—SSA, FC-AL, FireWire, and Serial Attached SCSI (SAS)—break from the traditional parallel SCSI standards and perform data transfer via serial communications. Although much of the documentation of SCSI talks about the parallel interface, most contemporary development effort is on serial SCSI. Serial SCSI has a number of advantages over parallel SCSI: faster data rates, hot swapping, and improved fault isolation. The primary reason for the shift to serial interfaces is the clock skew issue of high speed parallel interfaces, which makes the faster variants of parallel SCSI susceptible to problems caused by cabling and termination. Serial SCSI devices are more expensive than the equivalent parallel SCSI devices, but this is likely to change soon.

SCSI command protocol

In addition to many different hardware implementations, the SCSI standards also include a complex set of command protocol definitions. The SCSI command architecture was originally defined for parallel SCSI buses but has been carried forward with minimal change for use with iSCSI and serial SCSI. Other technologies which use the SCSI command set include the ATA Packet Interface, USB Mass Storage class and FireWire SBP-2.

In SCSI terminology, communication takes place between an initiator and a target. The initiator sends a command to the target which then responds. SCSI commands are sent in a Command Descriptor Block (CDB). The CDB consists of a one byte operation code followed by five or more bytes containing command-specific parameters.

At the end of the command sequence the target returns a Status Code byte which is usually 00h for success, 02h for an error (called a Check Condition), or 08h for busy. When the target returns a Check Condition in response to a command, the initiator usually then issues a SCSI Request Sense command in order to obtain a Key Code Qualifier (KCQ) from the target. The Check Condition and Request Sense sequence involves a special SCSI protocol called a Contingent Allegiance Condition.

There are 4 categories of SCSI commands: N (non-data), W (writing data from initiator to target), R (reading data), and B (bidirectional). There are about 60 different SCSI commands in total, with the most common being:

Each device on the SCSI bus is assigned at least one Logical Unit Number (LUN). Simple devices have just one LUN, more complex devices may have multiple LUNs. A "direct access" (i.e. disk type) storage device consists of a number of logical blocks, usually referred to by the term Logical Block Address (LBA). A typical LBA equates to 512 bytes of storage. The usage of LBAs has evolved over time and so four different command variants are provided for reading and writing data. The Read(6) and Write(6) commands contain a 21-bit LBA address. The Read(10), Read(12), Read Long, Write(10), Write(12), and Write Long commands all contain a 32-bit LBA address plus various other parameter options.

A "sequential access" (i.e. tape-type) device does not have a specific capacity because it typically depends on the length of the tape, which is not known exactly. Reads and writes on a sequential access device happen at the current position, not at a specific LBA. The block size on sequential access devices can either be fixed or variable, depending on the specific device. (Earlier devices, such as 9-track tape, tended to be fixed block, while later types, such as DAT, almost always supported variable block sizes.)

How SCSI works

SCSI uses a protocol method to transfer data between devices on the bus. It is a circular process which starts and ends up in the same layer. From the first layer, all additional layers of protocol must be executed before any data is transferred to or from another device and the layers of protocol must be completed after the data has been transferred to the end of the process. The protocol layers are referred to as "SCSI bus phases". These phases are:


The SCSI bus can be in only one phase at a given time.

SCSI device identification

In the modern SCSI transport protocols, there is an automated process of "discovery" of the IDs. SSA initiators "walk the loop" to determine what devices are there and then assign each one a 7-bit "hop-count" value. FC-AL initiators use the LIP (Loop Initialization Protocol) to interrogate each device port for its WWN (World Wide Name). For iSCSI, because of the unlimited scope of the (IP) network, the process is quite complicated. These discovery processes occur at power-on/initialization time and also if the bus topology changes later, for example if an extra device is added.

On a parallel SCSI bus, a device (e.g. host adapter, disk drive) is identified by a "SCSI ID", which is a number in the range 0-7 on a narrow bus and in the range 0–15 on a wide bus. On earlier models a physical jumper or switch controls the SCSI ID of the initiator (host adapter). On modern host adapters (since about 1997), doing I/O to the adapter sets the SCSI ID; for example, the adapter often contains a BIOS program that runs when the computer boots up and that program has menus that let the operator choose the SCSI ID of the host adapter. Alternatively, the host adapter may come with software that must be installed on the host computer to configure the SCSI ID. The traditional SCSI ID for a host adapter is 7, as that ID has the highest priority during bus arbitration (even on a 16 bit bus).

The SCSI ID of a device in a drive enclosure that has a backplane is set either by jumpers or by the slot in the enclosure the device is installed into, depending on the model of the enclosure. In the latter case, each slot on the enclosure's back plane delivers control signals to the drive to select a unique SCSI ID. A SCSI enclosure without a backplane often has a switch for each drive to choose the drive's SCSI ID. The enclosure is packaged with connectors that must be plugged into the drive where the jumpers are typically located; the switch emulates the necessary jumpers. While there is no standard that makes this work, drive designers typically set up their jumper headers in a consistent format that matches the way that these switches implement.

Note that a SCSI target device (which can be called a "physical unit") is often divided into smaller "logical units." For example, a high-end disk subsystem may be a single SCSI device but contain dozens of individual disk drives, each of which is a logical unit (more commonly, it is not that simple—virtual disk devices are generated by the subystem based on the storage in those physical drives, and each virtual disk device is a logical unit). The SCSI ID, WWN, etc. in this case identifies the whole subsystem, and a second number, the logical unit number (LUN) identifies a disk device within the subsystem.

It is quite common, though incorrect, to refer to the logical unit itself as a "LUN." Accordingly, the actual LUN may be called a "LUN number" or "LUN id".

Setting the bootable (or first) hard disk to SCSI ID 0 is an accepted IT community recommendation. SCSI ID 2 is usually set aside for the floppy disk drive while SCSI ID 3 is typically for a CD-ROM drive.[10]

SCSI enclosure services

In larger SCSI servers, the disk-drive devices are housed in an intelligent enclosure that supports SCSI Enclosure Services (SES). The initiator can communicate with the enclosure using a specialised set of SCSI commands to access power, cooling, and other non-data characteristics.
  1. 1.0 1.1 Clock rate in MHz for SPI, or bitrate (per second) for serial interfaces
  2. 2.0 2.1 In megabytes per second, not megabits per second
  3. 3.0 3.1 For daisy-chain designs, length of bus, from end to end; for point-to-point, length of a single link
  4. 4.0 4.1 Including any host adapters (i.e., computers count as a device)
  5. 5.0 5.1 spatial reuse
  6. 6.0 6.1 6.2 6.3 6.4 6.5 full duplex
  7. 7.0 7.1 7.2 7.3 per direction
  8. 8.0 8.1 8.2 500 meters for multi-mode, 3 kilometers for single-mode
  9. 128 per expander
  10. Groth, David; Dan Newland (January 2001). A+ Complete Study Guide (2nd Edition). Alameda, CA, USA: Sybex, 183. ISBN 0782142443.