SCSI

The Television & Movie Wiki: for TV, celebrities, and movies.

SCSI stands for "Small Computer System Interface", and is a standard interface and command set for transferring data between devices on both internal and external computer buses. SCSI is usually pronounced "scuzzy".

SCSI is most commonly used for hard disks and tape storage devices, but also connects a wide range of other devices, including scanners, CD-ROM drives, CD recorders, and DVD drives. In fact, the entire SCSI standard promotes device independence, which means that theoretically anything can be made SCSI — SCSI printers have been manufactured.

Since its standardization in 1986, SCSI has been commonly used in the Apple Macintosh and Sun Microsystems computer lines. It has never been popular in the IBM PC world, due to the lower cost and adequate performance of its ATA hard disk standard. The introduction of USB, FireWire, and ATAPI made SCSI a relatively unattractive proposition on PC due to its high cost and rising complexity.

At this time, SCSI is popular on high-performance workstations, servers, and high-end peripherals; and RAID arrays on servers almost always use SCSI hard disks. Desktop computers and notebooks more typically use the ATA/IDE or the newer SATA interfaces for hard disks, and USB or FireWire connections for external devices.

Contents

History

In 1979, Shugart Associates introduced an interface called SASI (Shugart Associates System Interface). At the same time, NCR Corporation's Peripherals division (now Engenio), had developed a more sophisticated product called BYSE, and was developing an ASIC to implement it. In late 1981, NCR and Shugart agreed to merge the best features of the two solutions, and to jointly promote the concept as an ANSI standard. After several committee meetings and after a number of other companies decided to adopt the combined standard, it received the new name "SCSI." In 1986, with SCSI already in widespread use, ANSI approved the SCSI spec (as X3.131-1986). Since then, SCSI has developed as an industry-wide standard, capable of being applied to virtually any computer system (there were even SCSI implementations for the venerable Commodore 64 and Apple II home computers). The first working SCSI ASIC was donated by NCR to the Smithsonian Museum.

Standards

SCSI has the unfortunate distinction of having among the most confusing set of standards names of anything in the computer field, with the probable exception of 3D video cards. There are a dozen SCSI interface names, most with ambiguous wording (Quick, which is faster: Wide SCSI or Fast SCSI?); three SCSI standards, each of which has a collection of modular, optional features; several different connector types; and three different types of voltage signalling. The leading SCSI card manufacturer, Adaptec, has manufactured over 100 varieties of SCSI cards over the years.

SCSI has evolved since its introduction. Before summarizing the evolution, a distinction should be made between the terminology used in the SCSI standard itself, as promulgated by the T10 committee of INCITS, and common parlance, as codified by the SCSI trade association, SCSITA.

As of 2003, there have only been three SCSI standards: SCSI-1, SCSI-2, and SCSI-3. All SCSI standards have been modular, defining various capabilities which manufacturers can include or not. Individual vendors and SCSITA have given names to specific combinations of capabilities. For example, the term "Ultra SCSI" is not defined anywhere in the standard, but is used to refer to SCSI implementations that signal at twice the rate of "Fast SCSI." Such a signalling rate is not compliant with SCSI-2 but is one option allowed by SCSI-3. Similarly, no version of the standard requires low-voltage-differential (LVD) signalling, but products called Ultra-2 SCSI include this capability. This terminology is helpful to consumers, because "Ultra-2 SCSI" device has a better-defined set of capabilities than simply identifying it as "SCSI-3."

Starting with SCSI-3, the SCSI standard has been maintained as a loose collection of standards, each defining a certain piece of the SCSI architecture, and bound together by the SCSI Architectural Model. This change divorces SCSI's various interfaces from the command set, allowing devices that support SCSI commands to use any interface (including ones not otherwise specified by T10), and also allowing the interfaces that are defined by T10 to develop on their own terms. This change is also why there is no "SCSI-4".

No version of the standard has ever specified what kind of connector should be used. The connectors used by vendors have tended to evolve over time. Although SCSI-1 devices typically used bulky Blue Ribbon ("Centronics") connectors, and SCSI-2 devices typically "Mini-D" connectors, it is not correct to refer to these as "SCSI-1" and "SCSI-2" connectors.

The mainstream implementations of SCSI (in chronological order) are as follows, using common parlance:

SCSI interface overview
Interface Bus width Clock speed Bus bandwidth Max. cable length Max. number of devices
SCSI 8 bits 5 MHz 5 MB/s 6m 8
Fast SCSI 8 bits 10 MHz 10 MB/s 1.5-3m 8
Wide SCSI 16 bits 10 MHz 20 MB/s 1.5-3m 16
Ultra SCSI 8 bits 20 MHz 20 MB/s 1.5-3m 5-8
Ultra Wide SCSI 16 bits 20 MHz 40 MB/s 1.5-3m 5-8
Ultra2 SCSI 8 bits 40 MHz 40 MB/s 12m 8
Ultra2 Wide SCSI 16 bits 40 MHz 80 MB/s 12m 16
Ultra3 SCSI 16 bits 40 MHz DDR 160 MB/s 12m 16
Ultra-320 SCSI 16 bits 80 MHz DDR 320 MB/s 12m 16
SSA 1 bit 400 MBit 80 MB/s 25m 96
FC-AL 1 bit 2GBit 200 MB/s
per direction; full duplex
 ? 127
iSCSI Dependent upon IP network  ??
SAS 3Gbit 1 bit N/A 375 MB/s
per direction; full duplex
10m 16,256 (128 per expander)

SCSI-1

The original standard that was derived from SCSI and formally adopted in 1986 by ANSI. SCSI-1 features an 8-bit bus (with parity), running asynchronously at 3.5 MB/s or 5 MB/s in synchronous mode, and a maximum bus cable length of 6 meters (just under 20 feet -- compare that to the 18 inch (0.45 meter) limit of the ATA interface). A variation on the original standard included a high-voltage differential (HVD) implementation whose maximum cable length was many times that of the single-ended versions.

SCSI-2

This standard was introduced in 1989 and gave rise to the Fast SCSI and Wide SCSI variants. Fast SCSI doubled the maximum transfer rate to 10 MB/s and Wide SCSI doubled the bus width to 16 bits on top of that (to reach 20 MB/s). However, these improvements came at the minor cost of a reduced maximum cable length to 3 meters. SCSI-2 also specified a 32-bit version of Wide SCSI, which used 2 16-bit cables per bus; this was largely ignored by SCSI device makers because it was expensive and unnecessary, and was officially retired in SCSI-3.

SCSI-3

Before Adaptec and later SCSITA codified the terminology, the first parallel SCSI devices that exceeded the SCSI-2 capabilities were simply designated SCSI-3. These devices, also known as Ultra SCSI and fast-20 SCSI, were introduced in 1992. The bus speed doubled again to 20 MB/s for narrow (8 bit) systems and 40 MB/s for wide. The maximum cable length stayed at 3 meters but ultra SCSI developed an undeserved reputation for extreme sensitivity to cable length and condition (faulty cables, connectors or terminators were often to blame for instability problems).

Ultra-2

This standard was introduced c. 1997 and featured a low voltage differential (LVD) bus. For this reason ultra-2 is sometimes referred to as LVD SCSI. Using LVD technology, it became possible to allow a maximum bus cable length of 12 meters (almost 40 feet!), with much greater noise immunity. At the same time, the data transfer rate was increased to 80 MB/s. Ultra-2 SCSI actually had a relatively short lifespan, as it was soon superseded by ultra-3 (ultra-160) SCSI.

Ultra-3

Also known as Ultra-160 SCSI and introduced toward the end of 1999, this version was basically an improvement on the ultra-2 standard, in that the transfer rate was doubled once more to 160 MB/s by the use of double transition clocking. Ultra-160 SCSI offered new features like cyclic redundancy check (CRC), an error correcting process, and domain validation.

Ultra-320

This is the ultra-160 standard with the data transfer rate doubled to 320 MB/s. Nearly all new SCSI hard drives being manufactured at the time of this writing (October 2003) are actually ultra-320 devices.

Ultra-640

Ultra-640 (otherwise known as Fast-320) was promulgated as a standard (INCITS 367-2003 or SPI-5) in early 2003. Ultra-640 doubles the interface speed yet again, this time to 640 MB/s. Ultra640 pushes the limits of LVD signaling; the speed limits cable lengths drastically, making it impractical for more than one or two devices. Because of this, most manufacturers have skipped over Ultra640 and are developing for Serial Attached SCSI instead.

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

Three recent versions of SCSI SSA, FC-AL and Serial Attached SCSI break from the traditional parallel SCSI standards and perform data transfer via serial communications.

SCSI command protocol

In additon to all the different hardware implementations, the SCSI standards also include a complex set of protocol definitions.

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). Each CDB can be a total of 6, 10, 12, or 16 bytes, but later versions of the SCSI standard also allow for variable-length CDBs. The CDB consists of a one byte operation code followed by some command-specific parameters.

At the end of the command the target returns a code byte 00h for success, 02h for an error (called a Check Condition), or 08h for busy. When a SCSI target device 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.

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:

  • Test unit ready - "ping" the device to see if it responds
  • Inquiry - return basic device information
  • Send diagnostic - the device performs a self-test and returns the result
  • Request sense - give any error codes from the previous command
  • Read capacity - return storage capacity
  • Format Unit
  • Read (4 variants)
  • Write (4 variants)
  • Write and verify
  • Mode select - set device parameters, held in a number of mode pages
  • Mode sense - return current device parameters

Each device on the SCSI bus is assigned at least one logical unit number (LUN). In some more complex implementations (such as storage virtualization) one physical device may behave as if it is many separate LUNs. A 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 addressing scheme for 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.

SCSI bus operation

This section relates only to parallel SCSI buses (although similar sequences occur on serial SCSI buses).

All SCSI commands start with a process called arbitration when one or more devices attempt to access the bus. During the arbitration phase, the 8 or 16 data bus signals are used to identify which device(s) are requesting access. All SCSI devices must implement the same arbitration algorithm so the result is always unamimous. The parallel SCSI bus goes through 8 phases as a command is processed:

  • Bus-free
  • Arbitration - one or more devices assert BSY and their ID bit
  • Selection - one device wins the arbitration by asserting BSY and SEL
  • Command - the initiator sends the CDB to the target
  • Data - direction of transfer depends on the command
  • Message - SCSI message code - interface management information
  • Status - SCSI status byte - success or failure information
  • Bus-free

The arbitration process can use up a lot of bus bandwidth so more recent devices support a simplified protocol called Quick Arbitration and Selection (QAS).

Compatibility

Note: Ultra-2, ultra-160 and ultra-320 devices may be freely mixed on the LVD bus with no compromise in performance, as the host adapter will negotiate the operating speed and bus management requirements for each device. Single-ended devices should not be attached to the LVD bus, as doing so will force all devices to run at the slower single-ended speed. Support for single-ended interfaces has been deprecated in the SPI-5 standard (which describes Ultra-640), so future devices may not be electrically backward compatible.

Caution: Modern Single Connector Attachment (SCA) devices may be connected to older controller/drive chains by using SCA adapters. Although these adapters often have auxiliary power connectors, use caution: it is possible to quickly destroy the drive by connecting external power. Always try the drive without auxiliary power first.

SCSI devices are generally backward-compatible, i.e., it is possible to connect an ultra-3 SCSI hard disk to an ultra-2 SCSI controller and use it (though with reduced speed and feature set).

Each SCSI device (including the computer's host adapter) must be configured to have a unique SCSI ID on the bus. Also, the SCSI bus must be terminated with a terminator. Both active and passive terminators are in common use, with the active type much preferred (and required on LVD buses). Improper termination is a common problem with SCSI installations.

It is possible to convert a wide bus to a narrow one, with widedevices closer to the adapter. To do this properly requires a cable which terminates the wide part of the bus. This is sometimes referred to as a cable with high-9 termination. Specific commands allow the host to determine the active width of the bus. This arrangement is discouraged.

SCSI IDs

All devices on a parallel SCSI bus must have a SCSI ID. The initiator (controller) SCSI ID is usually set by a physical jumper or switch. The target (disk-drive) SCSI IDs are either set by physical jumpers or by control signals which vary for each connector in an enclosure.

The SCSI ID is a 3-bit value for 8-bit wide buses and a 4-bit value for 16-bit wide buses. The priority sequence for an 8-bit wide SCSI bus is: 7 (highest), 6, 5, 4, 3, 2, 1, 0 (lowest). The priority sequence for a 16-bit wide SCSI bus has to meet legacy requirements so is less obvious: 7 (highest), 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 (lowest). The SCSI ID of the initiator is usually set to the highest priority value of 7. If there are two initators then their SCSI IDs are usually set to 7 and 6. All the remaining unused SCSI IDs can then used for disk-drives or other storage devices.

SCSI IDs are used in the arbitration process to determine which device next gets access to the SCSI bus. If two devices attempt to access the bus at the same time then the one with the highest priority SCSI ID will win the arbitration. During the arbitration process, the 8 or 16 data bus signals are used to determine which device(s) are requesting arbitration.

Termination

Parallel SCSI buses must always be terminated at both ends to ensure reliable operation.

A positive voltage is provided by one or more devices on the bus, typically the initiator(s). This positive voltage is called TERMPOWER and is usually around +4.3 volts. TERMPOWER is normally generated by a diode connection to +5.0 volts. This is called a diode-OR arrangement.

Some early disk drives included internal terminators, but most modern disk-drives do not provide termination which is then deemed to be external.

Termination can be passive or active. Passive termination means that each signal line is terminated by two resistors, 220 Ohms to TERMPOWER and 330 Ohms to ground. Active termination means that there is a small voltage regulator which provides a +3.3V supply. Each signal line is then terminated by a 110 Ohm resistor to the +3.3V supply.

In current practice most parallel SCSI buses are LVD and so require external, active termination. The usual termination circuit consists of a +3.3V linear regulator and commercially available SCSI resistor network devices (not individual resistors).

See Termination Tutorial.

External links

da:SCSI de:Small Computer System Interface es:SCSI fr:Small Computer System Interface it:Small Computer System Interface he:SCSI nl:SCSI ja:SCSI no:Small computer system interface pl:SCSI pt:SCSI fi:SCSI sv:SCSI zh:小型计算机系统接口

Retrieved from "http://tvwiki.tv/wiki/SCSI"
Personal tools
Toolbox