Jump to content

SCSI

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Pweltz (talk | contribs) at 17:06, 19 February 2007 (link to SCSI connector page). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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, printers, and optical drives (CD, DVD, etc.). The SCSI standards promote device independence, which means that, at least in theory, almost any type of hardware can be connected via SCSI.

SCSI is most commonly pronounced "scuzzy"[1][2].

History

SCSI is based on "SASI", the "Shugart Associates System Interface", introduced by the eponymous company in 1979. The Shugart SASI controller provided an interface between a hard disk's serial analog interface (called RLL) and a host computer, which needed to read sectors (blocks) of data. SASI interfaces were 5.25"x8" in size, mounted usually on top of a hard disk. SASI was used in mini- and microcomputers like the Apple II. SASI defined the interface as using a 50-pin flat ribbon connector.

Some say SCSI used to be spelled SC/ASI at some point in history.[citation needed] The "small" part is historical; since the mid-1990s, SCSI has been available on even the largest of computer systems.

Since its standardization in 1986, SCSI has been commonly used in the Apple Macintosh and Sun Microsystems computer lines. Apple switched to IDE around 1998, and Sun has switched its lower end range to SATA. SCSI has never been popular in the low-priced IBM PC world, owing to the lower cost and adequate performance of its ATA hard disk standard. SCSI drives and even SCSI RAIDs became common in PC workstations for video or audio production, but the appearance of large cheap SATA drives (e.g., 750 gigabytes) means that SATA is rapidly taking over this market.

At this time, SCSI is popular on high-performance workstations and servers. RAIDs on servers almost always use SCSI hard disks, though a number of manufacturers offer SATA-based RAID systems as a cheaper option. Desktop computers and notebooks more typically use the ATA/IDE or the newer Serial ATA interfaces for hard disks, and USB and FireWire connections for external devices.

SCSI interfaces

SCSI is available in 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, 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. Finally, many other interfaces which do not rely on complete SCSI standards still implement the SCSI command protocol

Connector information: See SCSI_connector

SCSI interface overview

Parallel SCSI

Interface Alternative
names
Specification
document
Connector Width
(bits)
Clock [3] Maximum
Throughput [4] Length
(single ended) [5]
Length LVD Length HVD Devices [6]
SCSI-1 SCSI-1 IDC50; Centronics C50 8 5 MHz 5 MB/s 6 m NA 25m 8
Fast SCSI SCSI-2 IDC50; Centronics C50 8 10 MHz 10 MB/s 1.5-3 m NA 25m 8
Fast-Wide SCSI SCSI-2;
SCSI-3 SPI
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 50-pin 8 40 MHz 40 MB/s NA 12m 25m 8
Ultra2 Wide SCSI SCSI-3 SPI-2 68-pin; 80-pin SCA-2 16 40 MHz 80 MB/s NA 12m 25m 16
Ultra3 SCSI Ultra-160 SCSI-3 SPI-3 68-pin; 80-pin SCA-2 16 40 MHz DDR 160 MB/s 25m 12m NA 16
Ultra-320 SCSI 16 80 MHz DDR 320 MB/s NA 12m NA 16
Ultra-640 SCSI 16 160 MHz DDR 640 MB/s ?? 16

Fiber, serial and iSCSI

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

iSCSI

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, IEEE1394, 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 number of advantages over parallel SCSI—faster data rates, hot swapping, and improved fault isolation. 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.

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.)

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. You usually set the SCSI ID of the initiator (host adapter) with a physical jumper or switch on early models. On modern (since about 1997) host adapters, you set the SCSI ID by doing I/O to the adapter; for example, the adapter often contains a BIOS program that runs when the computer boots up and that program has menus that let you choose the SCSI ID of the host adapter. Or the host adapter may come with software you can install on the computer to do this. 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).

You set the SCSI ID for a target (e.g. disk drive) either with physical jumpers or by your choice of the slot in which you install the drive in a drive enclosure (each connector 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 in the enclosure to choose the drive's SCSI ID. The way this works is that the enclosure has a connector that you plug into the drive where jumpers are supposed to go; the switch emulates the necessary jumpers. While there is no standard that makes this work, drive designers typically set up their jumper headers in 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, WWNN, 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, you may see the actual LUN called a "LUN number" or "LUN id".

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.

Notes

  1. ^ "SCSI." American Heritage Dictionary.
  2. ^ Field. The Book of SCSI. p. 1.
  3. ^ Clock rate in MHz for SPI, or bitrate (per second) for serial interfaces
  4. ^ In megabytes per second, not megabits per second
  5. ^ For daisy-chain designs, length of bus, from end to end; for point-to-point, length of a single link
  6. ^ Including any host adapters (i.e., computers count as a device)
  7. ^ Clock rate in MHz for SPI, or bitrate (per second) for serial interfaces
  8. ^ In megabytes per second, not megabits per second
  9. ^ For daisy-chain designs, length of bus, from end to end; for point-to-point, length of a single link
  10. ^ Including any host adapters (i.e., computers count as a device)
  11. ^ a b spatial reuse
  12. ^ a b c d e f full duplex
  13. ^ a b c d per direction
  14. ^ a b c 500 meters for multi-mode, 3 kilometers for single-mode
  15. ^ 128 per expander

References