SCSI Command Basics
SCSI has a rich command language that is used to move data between systems and storage quickly and accurately. Unlike commands used with systems and networking equipment, SCSI commands are rarely, if ever, entered from a command line or graphical
Command Descriptor Blocks
Protocols provide a defined format for communications, allowing sending and receiving nodes to agree completely on what is being communicated. The format of the information that is exchanged is called a protocol data unit (PDU).
The PDU for SCSI commands is called a
command descriptor block (CDB)
. Initiators create CDBs, and the device server running in the logical unit interprets them. When the logical unit has finished processing the command, it responds by returning a status code for the command, along with any
Unlike most networking protocols, which have regularly-
SCSI status codes have meanings that do not necessarily coincide with human intuition. A response signaling that a task has completed simply means that the task has finished processing; it does not
Types of SCSI Commands
There are several different types of commands in SCSI, reflecting the diversity of systems and devices it supports. In fact, multiple subcommittees in the T10 organization work on different
Basic SCSI Commands
The SCSI commands used most often for storage I/O transmissions are the READ and WRITE commands. READ commands request data to be sent by a logical unit in a storage target to the initiator, where it is then sent to a requesting application. WRITE commands request that data that is sent from the initiator to the logical unit be written to storage media. The intent of these commands is not just to transfer data between initiators and targets but to ensure that it
Three other commonly used SCSI commands are MODE SENSE, MODE SELECT, and REPORT LUNS. The MODE SENSE and MODE SELECT commands are used together by applications to determine what operating capabilities (modes) a storage device or logical device has and to choose to use one of those modes. For instance, a MODE SENSE command could be used to discover the ways a tape drive can handle end-of-tape conditions. MODE SELECT could then be used by a backup application to work in the optimal fashion with the software's logic.
The REPORT LUNS command is used by an initiator when it attempts to discover what LUNs are available through a specific device port. After receiving the REPORT LUNS command, a target responds with an inventory of all the available LUNs exported through the port the command was received on. The REPORT LUNS command is at the
While there is a lot of flexibility in how storage devices are designed, all SCSI targets are required to support four commands: INQUIRY, READ CAPACITY, REQUEST SENSE, and TEST UNIT READY.
The SCSI INQUIRY command is used to discover what the configuration is for a target and logical unit, including such things as manufacturers and product identification, version
Certain SCSI commands reserve storage devices for the use of specific applications servers. This feature is particularly useful for backup applications where it is desired to reserve the use of tape drives and tapes for the highest-priority servers. This mechanism also includes a way to remove
The SCSI reservation mechanism was not used much prior to the
Extended Copy and Third-Party Copy
A relatively new SCSI command that is primarily
Figure 6-7. SCSI EXTENDED COPY Processing
In Figure 6-7, an initiator in a system sends an EXTENDED COPY command to a dual-mode storage controller. Acting as a SCSI target, this controller receives and interprets the EXTENDED COPY command and then proceeds to execute its initiator role by reading data from the source target and writing it to a destination target. The network ports on the dual-mode controller are not shown. There could be a single port or multiple ports. The actual port configuration does not impact the SCSI function, which is independent of the connecting technology.
The EXTENDED COPY command was designed to enable the transfer of data between different types of storage devices, such as disk, tape, and optical devices/subsystems. But it can also be used to transfer data between different virtual storage resources within the same subsystem.
Intuitively, EXTENDED COPY would seem to make a lot of sense for performing
Information Storage and Management: Storing, Managing, and Protecting Digital Information
Storage Networks Explained: Basics and Application of Fibre Channel SAN, NAS, iSCSI, InfiniBand and FCoE
Cisco Storage Networking Cookbook: For NX-OS release 5.2 MDS and Nexus Families of Switches
Storage Networking Protocol Fundamentals (Vol 2)