Section 2.1. SCSI

   

2.1 SCSI

SCSI stands for "Small Computer System Interface," a title that is now a misnomer, given that SCSI devices are usually found in high-performance servers and are the dominant storage choice for large multi-CPU data center servers. The SCSI standards are defined by the T10 Technical Committee (http://www.t10.org), a body of the InterNational Committee for Information Technology Standards (INCITS), which in turn operates under the purview of the American National Standards Institute, or ANSI (http://www.ansi.org).

2.1.1 Standards

The SCSI bus was initially defined as a parallel architecture in which the data is sent, in parallel, over a data bus that is 8 or 16 bits wide. Serial SCSI architectures have also been defined and adopted. Serial Storage Architecture (SSA) and 1394 are just some examples. To some degree these architectures ( especially SSA) were developed independently and later folded into the SCSI-3 draft standards, a fact that sometimes causes confusion. Neither SSA nor 1394 has been widely adopted in the enterprise storage market, although 1394 is used in consumer storage devices.

The SCSI standards have evolved remarkably over the years , and there are a bewildering number of them. These standards are differentiated by the following features:

  • The width of the data bus.

  • The speed of the data bus.

  • The number of devices that can be supported on the bus.

  • The electrical and mechanical characteristics of the bus.

  • The maximum length of the bus.

  • The nature of the bus architecture ”serial or parallel. Although SCSI has historically been associated with parallel buses, the industry seems to be moving toward a serial architecture, and the SCSI standards are no exception.

Note that SCSI is now not a single standard, but a collection of standards. Some standards define mechanical and electrical characteristics; others define command sets implemented by devices. These standards have been implemented by other devices as well, such as Fibre Channel devices.

Table 2.1 summarizes the various defined SCSI standards and their characteristics.

The older standards, such as SCSI-1, are pretty much obsolete. The latest standard is SCSI-3, which is really not a single specification, but a family of specifications that continues to evolve . Thus the SCSI standard should now be thought of as a standard defining the command set and a series of other specifications dealing with specific physical implementations , such as wire. The significance is that one can now take just a particular specification and implement it over a different medium. A good example is the trend to implement the SCSI command set over Fibre Channel and SSA. The most popular devices currently available are Ultra SCSI and SCSI-3 devices.

2.1.2 Functions and Characteristics

Another important point is the trade-off between the distance at which the SCSI device can reside from the host bus adapter (HBA) and the number of SCSI devices on the bus. A higher number of devices dictates a shorter length for the SCSI bus; a lower number permits a longer length. The maximum bus length also depends on electrical characteristics of the bus. Note that this discussion pertains strictly to SCSI. Newer implementations such as iSCSI (discussed in Chapter 8) significantly change the distance limitations in that they pass SCSI commands and command results over geographical distances using Internet Protocol as a transport protocol.

Table 2.1. SCSI Standards and Characteristics

SCSI Type [a]

Bus Width (bits)

Bus Speed (MB/s)

Maximum Number of SCSI IDs

Maximum Bus Length ( meters )

SCSI-1

8

5

8

6 or 25

Fast SCSI (SCSI-2)

8

10

8

6 or 25

Wide SCSI (SCSI-2)

16

10

16

6 or 25

Fast Wide SCSI

16

20

16

6 or 25

(SCSI-2)

       

Ultra SCSI

8

20

8

1.5 or 25

(SCSI-3 SPI-1)

       
     

4

3

Wide Ultra SCSI

16

40

16

25

(SCSI-3 SPI-1)

   

8

1.5

     

4

3

Ultra2 SCSI

8

40

8

12

(SCSI-3 SPI-2)

   

2

25

Wide Ultra2 SCSI

16

80

16

12

(SCSI-3 SPI-2)

   

2

25

Ultra 3 SCSI or Ultra 160

16

80

16

12

(SCSI-3 SPI-3)

       

Ultra 320

16

320

16

12

(SCSI-3 SPI-4)

       

[a] The SCSI standard on which the type is based is shown in parentheses.

SCSI devices are connected in a daisy chain fashion. Each SCSI device on the bus is assigned a unique identifier. SCSI identifiers are not assigned arbitrarily, because they also indicate a relative priority that the device enjoys when contending for the bus with other devices.

SCSI devices are backward compatible, and some are even capable of operating in multiple SCSI modes. There are caveats here, though, and the details are beyond the purview of this book. The curious reader is directed to the references at the end of the book.

High-speed storage devices alone are not sufficient to ensure high performance and throughput. When we're evaluating a server, it is important to match the speed and bandwidth capacity of the storage to the speed and bandwidth capacity of the server's internal busses . Most high-end servers use multiple SCSI HBAs, which connect to multiple fast PCI (Peripheral Component Interconnect) buses to make sure that the PCI bus itself does not become a performance bottleneck.

2.1.3 Terminology and Commands

To accomplish a given I/O, one device on the SCSI bus will act as an initiator , and another device will act as the target . For example, the SCSI controller in a Windows NT server acts as an initiator, and a disk device or tape device acts as the target.

Although it is probably unusual for a device to be deployed as both a target and an initiator, most HBAs can be used as either one (depending on whether or not the firmware has the support turned on). iSCSI might be the best example of a dual target/initiator: One box can serve as a target as it exports its own local disks and as an initiator when using the disks of a remote iSCSI target.

The initiator sends a command to the target, and the target accomplishes the requested functionality and then sends an appropriate response. A SCSI target is passive until it receives a command from an initiator. Once a valid command has been received, the target arbitrates for control of the bus before responding to the command ”for example, when sending back the requested data. The initiator and all other devices on a shared bus play a role in bus arbitration.

When a Windows NT server boots up, its SCSI controller (often called a host bus adapter, as explained later) issues a SCSI command to each SCSI device that it finds on the bus. This is the Report LUNs command, which causes the target device to return an inventory of all logical unit numbers (LUNs) that it controls. See Section 2.5 for an explanation of LUNs.

The SCSI Reserve and Release commands also are important. When multiple initiators are present, an initiator may want to ensure that it has sole access to a target device. A good example is when an initiator wants to ensure that it has sole access to a tape device. Having two initiators take turns writing to a tape device would cause the tape reel to have useless data. The Reserve and Release commands facilitate this access control.

There are two different forms of SCSI Reserve and Release commands. One form is called nonpersistent because a reset of the target device will cause the reservation to be voided. Another form, called a persistent reservation, will cause the reservation to continue to be enforced even when the target device is reset. Target devices may need to be reset if the initiator device encounters problems after the reservation is made. Another command allows the initiator to reserve the target device on behalf of another device, called a third-party reserve . Reservations are expected to be released by the device that made them or by the third-party device on whose behalf the reservation was made.

The Extended Copy command allows an initiator to send a command to a target SCSI device requesting that the target device perform a copy between two sets of SCSI devices. The devices between which the copy is performed may be, but need not be, distinct from the device that receives the Extended Copy command and acts on it. An accompanying command, Receive Copy Results, collects the status from execution of the Extended Copy command, which can be used to determine the nature of any errors that were encountered during execution of the Extended Copy command.

SCSI-3 defines some additional commands. The sets of commands defined for SCSI include block-oriented commands, graphics commands, and changer commands.

Windows NT requires applications to use an interface called the SCSI pass-through interface to send commands to SCSI devices. Actually the interface is used to send commands to Fibre Channel devices as well, since they also implement the SCSI command set. An application uses the DeviceIoControl API with the IoControlCode of IOCTL_SCSI_PASS_THROUGH or IOCTL_SCSI_PASS_THROUGH_DIRECT. Applications must first acquire a file handle for the SCSI device using the CreateFile API. Starting with Windows 2000, Microsoft tightened security by requiring applications to specify read/write access in the CreateFile API and allowing only limited user accounts to have write access. Thus the CreateFile API will return an error for most users other than those that the system administrator chooses to allow.

Although this interface does work, on reflection one can see that the architecture is not quite consistent. On one hand, the operating system reflects a philosophy of "anything I see, I own," including resources such as disk drives . On the other hand, the operating system is not even aware when an application reserves a storage device and releases it. A better architecture is one in which an application asks the operating system to perform the necessary function and the operating system either denies the request if it cannot be satisfied or performs the requested operation and returns the appropriate status to the application. Whether or not a future version of Windows moves in this direction is something only time will tell.


   
Top


Inside Windows Storage
Inside Windows Storage: Server Storage Technologies for Windows 2000, Windows Server 2003 and Beyond
ISBN: 032112698X
EAN: 2147483647
Year: 2003
Pages: 111
Authors: Dilip C. Naik

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net