SCSI command

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.

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 1Fh 6
20h to 5Fh 10
60h to 7Dh reserved
7Eh variable (more than 16 bytes)
7Fh extended (variable length; may contain one or more CDBs)
80H to 9Fh 16
A0h to BFh 12
C0h to FFh vendor 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).

Code Command
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)
42UNMAP
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)
A2 SECURITY 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)
BF VOLUME SET (OUT)

External links

This article is issued from Wikipedia - version of the 8/19/2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.