SCSI command

Last updated

In SCSI computer storage, computers and storage devices use a client-server model of communication. The computer is a client which requests the storage device to perform a service, e.g., to read or write data. The SCSI command architecture was originally defined for parallel SCSI buses but has been carried forward with minimal change for use with Fibre Channel, iSCSI, Serial Attached SCSI, and other transport layers.

Contents

In the SCSI protocol, the initiator sends a SCSI command information unit to the target device. Data information units may then be transferred between the computer and device. Finally, the device sends a response information unit to the computer.

SCSI commands are sent in a command descriptor block (CDB), which consists of a one byte operation code (opcode) followed by five or more bytes containing command-specific parameters. Upon receiving and processing the CDB the device will return a status code byte and other information.

The rest of this article contains a list of SCSI commands, sortable in opcode or description alphabetical order. In the published SCSI standards, commands are designated as "mandatory," "optional" or "vendor-unique." Only the mandatory commands are required of all devices. There are links to detailed descriptions for the more common SCSI commands. Some opcodes produce different, though usually comparable, effects in different device types; for example, opcode 0x01 recalibrates a disk drive by seeking back to physical sector zero, but rewinds the medium in a tape drive.

SCSI command lengths

Originally the most significant 3 bits of a SCSI opcode specified the length of the CDB. However, when variable-length CDBs were created this correspondence was changed, and the entire opcode must be examined to determine the CDB length. The lengths are as follows:

Opcode (hex )Length
00h to 1Fh6
20h to 5Fh10
60h to 7Dhreserved
7Ehvariable (more than 16 bytes)
7Fhextended (variable length; may contain one or more CDBs)
80h to 9Fh16
A0h to BFh12
C0h to FFhvendor specific

List of SCSI commands

When a command is defined in multiple CDB sizes, the length of the CDB is given in parentheses after the command name, e.g., READ(6) and READ(10).

CodeCommand
00TEST UNIT READY
01REWIND
03REQUEST SENSE
04FORMAT
05READ BLOCK LIMITS
07REASSIGN BLOCKS
07INITIALIZE ELEMENT STATUS
08READ(6)
0AWRITE(6)
0BSEEK(6)
0FREAD REVERSE(6)
10WRITE FILEMARKS(6)
11SPACE(6)
12INQUIRY
13VERIFY(6)
14RECOVER BUFFERED DATA
15MODE SELECT(6)
16RESERVE(6)
17RELEASE(6)
18COPY
19ERASE (6)
1AMODE SENSE (6)
1BSTART STOP UNIT
1BLOAD UNLOAD
1CRECEIVE DIAGNOSTIC RESULTS
1DSEND DIAGNOSTIC
1EPREVENT ALLOW MEDIUM REMOVAL
23READ FORMAT CAPACITIES
25READ CAPACITY(10)
28READ(10)
29READ GENERATION
2AWRITE(10)
2BSEEK(10)
2BLOCATE(10)
2CERASE(10)
2DREAD UPDATED BLOCK
2EWRITE AND VERIFY(10)
2FVERIFY(10)
33SET LIMITS(10)
34PRE-FETCH(10)
34READ POSITION
35SYNCHRONIZE CACHE(10)
36LOCK UNLOCK CACHE(10)
37READ DEFECT DATA(10)
37INITIALIZE ELEMENT STATUS WITH RANGE
38MEDIUM SCAN
39COMPARE
3ACOPY AND VERIFY
3BWRITE BUFFER
3CREAD BUFFER
3DUPDATE BLOCK
3EREAD LONG(10)
3FWRITE LONG(10)
40CHANGE DEFINITION
41WRITE SAME(10)
42 UNMAP
43READ TOC/PMA/ATIP
44REPORT DENSITY SUPPORT
45PLAY AUDIO(10)
46GET CONFIGURATION
47PLAY AUDIO MSF
48SANITIZE
4AGET EVENT STATUS NOTIFICATION
4BPAUSE/RESUME
4CLOG SELECT
4DLOG SENSE
50XDWRITE(10)
51XPWRITE(10)
51READ DISC INFORMATION
52XDREAD(10)
53XDWRITEREAD(10)
54SEND OPC INFORMATION
55MODE SELECT(10)
56RESERVE(10)
57RELEASE(10)
58REPAIR TRACK
5AMODE SENSE(10)
5BCLOSE TRACK/SESSION
5CREAD BUFFER CAPACITY
5DSEND CUE SHEET
5EPERSISTENT RESERVE IN
5FPERSISTENT RESERVE OUT
7Eextended CDB
7Fvariable length CDB
80XDWRITE EXTENDED(16)
80WRITE FILEMARKS(16)
81READ REVERSE(16)
83Third-party Copy OUT commands
84Third-party Copy IN commands
85ATA PASS-THROUGH(16)
86ACCESS CONTROL IN
87ACCESS CONTROL OUT
88READ(16)
89COMPARE AND WRITE
8AWRITE(16)
8BORWRITE
8CREAD ATTRIBUTE
8DWRITE ATTRIBUTE
8EWRITE AND VERIFY(16)
8FVERIFY(16)
90PRE-FETCH(16)
91SYNCHRONIZE CACHE(16)
91SPACE(16)
92LOCK UNLOCK CACHE(16)
92LOCATE(16)
93WRITE SAME(16)
93ERASE(16)
9DSERVICE ACTION BIDIRECTIONAL
9ESERVICE ACTION IN(16)
9FSERVICE ACTION OUT(16)
A0REPORT LUNS
A1ATA PASS-THROUGH(12)
A2SECURITY PROTOCOL IN
A3MAINTENANCE IN
A4MAINTENANCE OUT
A4REPORT KEY
A5MOVE MEDIUM
A5PLAY AUDIO 12
A6EXCHANGE MEDIUM
A7MOVE MEDIUM ATTACHED
A8READ(12)
A9SERVICE ACTION OUT(12)
AAWRITE(12)
ABSERVICE ACTION IN(12)
ACERASE(12)
ADREAD DVD STRUCTURE
AEWRITE AND VERIFY(12)
AFVERIFY(12)
B0SEARCH DATA HIGH(12)
B1SEARCH DATA EQUAL(12)
B2SEARCH DATA LOW(12)
B3SET LIMITS(12)
B4READ ELEMENT STATUS ATTACHED
B5SECURITY PROTOCOL OUT
B6SEND VOLUME TAG
B7READ DEFECT DATA(12)
B8READ ELEMENT STATUS
B9READ CD MSF
BAREDUNDANCY GROUP (IN)
BBREDUNDANCY GROUP (OUT)
BCSPARE (IN)
BDSPARE (OUT)
BEVOLUME SET (IN)
BFVOLUME SET (OUT)

Related Research Articles

<span class="mw-page-title-main">Parallel ATA</span> Interface standard for the connection of storage devices

Parallel ATA (PATA), originally AT Attachment, also known as ATA or IDE is a standard interface designed for IBM PC-compatible computers. It was first developed by Western Digital and Compaq in 1986 for compatible hard drives and CD or DVD drives. The connection is used for storage devices such as hard disk drives, floppy disk drives, and optical disc drives in computers.

<span class="mw-page-title-main">Disk storage</span> General category of storage mechanisms

Disk storage is a general category of storage mechanisms where data is recorded by various electronic, magnetic, optical, or mechanical changes to a surface layer of one or more rotating disks. A disk drive is a device implementing such a storage mechanism. Notable types are the hard disk drive (HDD) containing a non-removable disk, the floppy disk drive (FDD) and its removable floppy disk, and various optical disc drives (ODD) and associated optical disc media.

<span class="mw-page-title-main">SCSI</span> Set of computer and peripheral connection standards

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, electrical, optical and logical interfaces. 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. The initial Parallel SCSI was most commonly used for hard disk drives and tape drives, but it can connect a wide range of other devices, including scanners and CD drives, although not all controllers can handle all devices.

<span class="mw-page-title-main">Booting</span> Process of starting a computer

In computing, booting is the process of starting a computer as initiated via hardware such as a button or by a software command. After it is switched on, a computer's central processing unit (CPU) has no software in its main memory, so some process must load software into memory before it can be executed. This may be done by hardware or firmware in the CPU, or by a separate processor in the computer system.

Internet Small Computer Systems Interface or iSCSI is an Internet Protocol-based storage networking standard for linking data storage facilities. iSCSI provides block-level access to storage devices by carrying SCSI commands over a TCP/IP network. iSCSI facilitates data transfers over intranets and to manage storage over long distances. It can be used to transmit data over local area networks (LANs), wide area networks (WANs), or the Internet and can enable location-independent data storage and retrieval.

In computing, a block, sometimes called a physical record, is a sequence of bytes or bits, usually containing some whole number of records, having a maximum length; a block size. Data thus structured are said to be blocked. The process of putting data into blocks is called blocking, while deblocking is the process of extracting data from blocks. Blocked data is normally stored in a data buffer, and read or written a whole block at a time. Blocking reduces the overhead and speeds up the handling of the data stream. For some devices, such as magnetic tape and CKD disk devices, blocking reduces the amount of external storage required for the data. Blocking is almost universally employed when storing data to 9-track magnetic tape, NAND flash memory, and rotating media such as floppy disks, hard disks, and optical discs.

Modbus is a data communications protocol originally published by Modicon in 1979 for use with its programmable logic controllers (PLCs). Modbus has become a de facto standard communication protocol and is now a commonly available means of connecting industrial electronic devices.

In computer storage, a logical unit number, or LUN, is a number used to identify a logical unit, which is a device addressed by the SCSI protocol or by Storage Area Network protocols that encapsulate SCSI, such as Fibre Channel or iSCSI.

In computer data storage, a SCSI initiator is the endpoint that initiates a SCSI session, that is, sends a SCSI command. The initiator usually does not provide any Logical Unit Numbers (LUNs).

<span class="mw-page-title-main">USB mass storage device class</span>

The USB mass storage device class is a set of computing communications protocols, specifically a USB Device Class, defined by the USB Implementers Forum that makes a USB device accessible to a host computing device and enables file transfers between the host and the USB device. To a host, the USB device acts as an external hard drive; the protocol set interfaces with a number of storage devices.

In computing, channel I/O is a high-performance input/output (I/O) architecture that is implemented in various forms on a number of computer architectures, especially on mainframe computers. In the past, channels were generally implemented with custom devices, variously named channel, I/O processor, I/O controller, I/O synchronizer, or DMA controller.

In SCSI standards for transferring data between computers and peripheral devices, often computer storage, commands are sent in a Command Descriptor Block (CDB).

Most recent SCSI enclosure products support a protocol called SCSI Enclosure Services (SES). The initiator can communicate with the enclosure using a specialized set of SCSI commands to access power, cooling, and other non-data characteristics.

<span class="mw-page-title-main">Parallel SCSI</span>

Parallel SCSI is the earliest of the interface implementations in the SCSI family. SPI is a parallel bus; there is one set of electrical connections stretching from one end of the SCSI bus to the other. A SCSI device attaches to the bus but does not interrupt it. Both ends of the bus must be terminated.

<span class="mw-page-title-main">Disk buffer</span>

In computer storage, disk buffer is the embedded memory in a hard disk drive (HDD) or solid state drive (SSD) acting as a buffer between the rest of the computer and the physical hard disk platter or flash memory that is used for storage. Modern hard disk drives come with 8 to 256 MiB of such memory, and solid-state drives come with up to 4 GB of cache memory.

Count key data (CKD) is a direct-access storage device (DASD) data recording format introduced in 1964, by IBM with its IBM System/360 and still being emulated on IBM mainframes. It is a self-defining format with each data record represented by a Count Area that identifies the record and provides the number of bytes in an optional Key Area and an optional Data Area. This is in contrast to devices using fixed sector size or a separate format track.

SCSI / ATA Translation (SAT) is a set of standards developed by the T10 subcommittee, defining how to communicate with ATA devices through a SCSI application layer. The standard attempts to be consistent with the SCSI architectural model, the SCSI Primary Commands, and the SCSI Block Commands standards.

iSCSI conformance testing is testing to determine whether an iSCSI Initiator/Target meets the iSCSI standard.

The IBM System/360 architecture is the model independent architecture for the entire S/360 line of mainframe computers, including but not limited to the instruction set architecture. The elements of the architecture are documented in the IBM System/360 Principles of Operation and the IBM System/360 I/O Interface Channel to Control Unit Original Equipment Manufacturers' Information manuals.

Object storage is a computer data storage that manages data as objects, as opposed to other storage architectures like file systems which manages data as a file hierarchy, and block storage which manages data as blocks within sectors and tracks. Each object typically includes the data itself, a variable amount of metadata, and a globally unique identifier. Object storage can be implemented at multiple levels, including the device level, the system level, and the interface level. In each case, object storage seeks to enable capabilities not addressed by other storage architectures, like interfaces that are directly programmable by the application, a namespace that can span multiple instances of physical hardware, and data-management functions like data replication and data distribution at object-level granularity.