SCSI command
Encyclopedia
In SCSI
computer storage
, a command is the basic unit of communication. 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
and Serial Attached SCSI
.
In SCSI protocol, the initiator
sends a SCSI command to the target which then responds. 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 target will return a status code
byte.
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. Note that some opcodes produce dissimilar 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
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, and electrical and optical interfaces. SCSI is most commonly used for hard disks and tape drives, but it...
computer storage
Computer storage
Computer data storage, often called storage or memory, refers to computer components and recording media that retain digital data. Data storage is one of the core functions and fundamental components of computers....
, a command is the basic unit of communication. The SCSI command architecture was originally defined for parallel SCSI
Parallel SCSI
Parallel SCSI is one of the interface implementations in the SCSI family. In addition to being a data bus, SPI is a parallel electrical 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...
buses but has been carried forward with minimal change for use with Fibre Channel
Fibre Channel
Fibre Channel, or FC, is a gigabit-speed network technology primarily used for storage networking. Fibre Channel is standardized in the T11 Technical Committee of the InterNational Committee for Information Technology Standards , an American National Standards Institute –accredited standards...
, iSCSI
ISCSI
In computing, iSCSI , is an abbreviation of Internet Small Computer System Interface, an Internet Protocol -based storage networking standard for linking data storage facilities. By carrying SCSI commands over IP networks, iSCSI is used to facilitate data transfers over intranets and to manage...
and Serial Attached SCSI
Serial Attached SCSI
Serial Attached SCSI is a computer bus used to move data to and from computer storage devices such as hard drives and tape drives. SAS depends on a point-to-point serial protocol that replaces the parallel SCSI bus technology that first appeared in the mid 1980s in data centers and workstations,...
.
In SCSI protocol, the initiator
SCSI initiator
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 ....
sends a SCSI command to the target which then responds. SCSI commands are sent in a command descriptor block
SCSI CDB
In SCSI computer storage, commands are sent in a Command Descriptor Block .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.A...
(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 target will return a status code
SCSI Status Code
A SCSI Status Code is used to determine the success or failure of a SCSI command. At the end of any command, the target returns a Status Code byte which should be one of the following:-02h Check condition:...
byte.
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. Note that some opcodes produce dissimilar 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.
List of SCSI commands
Code | Command |
---|---|
00 | TEST UNIT READY SCSI Test Unit Ready Command The SCSI Test Unit Ready command is used to determine if a device is ready to transfer data , i.e. if a disk has spun up, if a tape is loaded and ready etc. The device does not perform a self-test operation. See the Send Diagnostic command.... (mandatory) |
01 | RECALIBRATE or REWIND |
03 | REQUEST SENSE SCSI Request Sense Command The SCSI Request Sense command is used to obtain sense data from a target device.The CDB structure is:The response is a set of SCSI sense data which is structured as follows:... (mandatory except RBC) |
04 | FORMAT UNIT SCSI Format Unit Command The SCSI Format Unit command is used to destructively format a SCSI target device—usually a disk—and prepare the medium to store data. Defect management options may be specified in the CDB. Depending on the device characteristics and capacity, formatting may be a lengthy process... |
05 | READ BLOCK LIMITS |
07 | REASSIGN BLOCKS |
07 | INITIALIZE ELEMENT STATUS |
08 | READ (6) |
0A | WRITE (6) |
0B | SEEK (6) |
0F | READ REVERSE (6) |
10 | WRITE FILEMARKS (6) |
11 | SPACE (6) |
12 | INQUIRY SCSI Inquiry Command The SCSI Inquiry command is used to obtain basic information from a target device. The CDB structure is:If the EVPD parameter bit is zero and the Page Code parameter byte is zero then the target will return the standard inquiry data, which is structured as follows:The special fields in the... (mandatory) |
13 | VERIFY(6) |
14 | RECOVER BUFFERED DATA |
15 | MODE SELECT (6) SCSI Mode Select Command The SCSI Mode Select command is used to modify device information contained in mode pages in a SCSI target device. There are two different versions of the command, a 6 byte version and a 10 byte version.... |
16 | RESERVE (6) |
17 | RELEASE (6) |
18 | COPY |
19 | ERASE (6) |
1A | MODE SENSE (6) SCSI Mode Sense Command The SCSI Mode Sense command is used to obtain current device information from mode pages in a SCSI target device. There are two different versions of the command, a 6 byte version and a 10 byte version.The CDB structure for the Mode Sense command is:... |
1B | START/STOP UNIT SCSI Start Stop Unit Command The SCSI Start/Stop Unit command is used to control the motor in a rotary device such as a SCSI disk-drive. It is also used to load or eject removable media, such as a tape or compact disc... |
1B | LOAD UNLOAD |
1C | RECEIVE DIAGNOSTIC RESULTS SCSI Receive Diagnostic Results Command The SCSI Receive Diagnostic Results command is used to interrogate the results of a self-test. The self-test must have been triggered by a previous Send Diagnostic command which would have defined the self-test required. This is usually associated with one of the available diagnostic pages.The... |
1D | SEND DIAGNOSTIC SCSI Send Diagnostic Command The SCSI Send Diagnostic command is used to instruct a target device to perform a self-test on a specific LUN. The CDB structure is:The special parameter fields in the CDB have the following meaning:*PF - Page Format:... |
1E | PREVENT/ALLOW MEDIUM REMOVAL |
23 | READ FORMAT CAPACITIES (MMC) |
24 | SET WINDOW |
25 | READ CAPACITY (10) SCSI Read Capacity Command The SCSI Read Capacity command is used to obtain data capacity information from a target device.The command descriptor block structure is:The special control fields in the CDB have the following meaning:... |
28 | READ (10) |
29 | READ GENERATION |
2A | WRITE (10) |
2B | SEEK (10) |
2C | ERASE (10) |
2D | READ UPDATED BLOCK |
2E | WRITE AND VERIFY (10) |
2F | VERIFY (10) |
30 | SEARCH DATA HIGH (10) |
31 | SEARCH DATA EQUAL (10) |
32 | SEARCH DATA LOW (10) |
33 | SET LIMITS (10) |
34 | PRE-FETCH (10) |
35 | SYNCHRONIZE CACHE (10) |
36 | LOCK/UNLOCK CACHE (10) |
37 | READ DEFECT DATA (10) |
37 | INITIALIZE ELEMENT STATUS WITH RANGE |
38 | MEDIUM SCAN |
39 | COMPARE |
3A | COPY AND VERIFY |
3B | WRITE BUFFER |
3C | READ BUFFER |
3D | UPDATE BLOCK |
3E | READ LONG |
3F | WRITE LONG |
40 | CHANGE DEFINITION |
41 | WRITE SAME (10) |
44 | REPORT DENSITY SUPPORT |
45 | PLAY AUDIO (10) |
46 | GET CONFIGURATION |
47 | PLAY AUDIO MSF |
48 | AUDIO TRACK INDEX (not mentioned in T10 overview) |
49 | AUDIO TRACK RELATIVE 10 (not mentioned in T10 overview) |
4A | GET EVENT STATUS NOTIFICATION |
4B | PAUSE / RESUME |
4C | LOG SELECT SCSI Log Select Command The SCSI Log Select command "provides a means for an application client to manage statistical information maintained by the SCSI target device about the target device or its logical units"... |
4D | LOG SENSE SCSI Log Sense Command The SCSI Log Sense command is used to obtain current data from log pages in a SCSI target device. The CDB structure for the Log Sense command is:The special parameter fields in the CDB have the following meaning:... |
50 | XDWRITE (10) |
51 | XPWRITE (10) /*READ DISC INFORMATION CDB (in mmc5r02c 6.22.2)*/ |
52 | XDREAD (10) |
53 | XDWRITEREAD (10) |
54 | SEND OPC INFORMATION |
55 | MODE SELECT (10) SCSI Mode Select Command The SCSI Mode Select command is used to modify device information contained in mode pages in a SCSI target device. There are two different versions of the command, a 6 byte version and a 10 byte version.... |
56 | RESERVE (10) |
57 | RELEASE (10) |
58 | REPAIR TRACK |
5A | MODE SENSE (10) SCSI Mode Sense Command The SCSI Mode Sense command is used to obtain current device information from mode pages in a SCSI target device. There are two different versions of the command, a 6 byte version and a 10 byte version.The CDB structure for the Mode Sense command is:... |
5B | CLOSE TRACK / SESSION |
5C | READ BUFFER CAPACITY |
5D | SEND CUE SHEET |
5E | PERSISTENT RESERVE IN |
5F | PERSISTENT RESERVE OUT |
7E | EXTENDED CDB |
7F | VARIABLE LENGTH CDB |
80 | XDWRITE EXTENDED (16) |
80 | WRITE FILEMARKS (16) |
81 | REBUILD (16) |
81 | READ REVERSE (16) |
82 | REGENERATE (16) |
83 | EXTENDED COPY |
84 | RECEIVE COPY RESULTS |
85 | ATA COMMAND PASS THROUGH (16) |
86 | ACCESS CONTROL IN |
87 | ACCESS CONTROL OUT |
88 | READ (16) |
89 | COMPARE AND WRITE |
8A | WRITE (16) |
8B | ORWRITE |
8C | READ ATTRIBUTE |
8D | WRITE ATTRIBUTE |
8E | WRITE AND VERIFY (16) |
8F | VERIFY (16) |
90 | PRE-FETCH (16) |
91 | SYNCHRONIZE CACHE (16) |
91 | SPACE (16) |
92 | LOCK UNLOCK CACHE (16) |
93 | WRITE SAME (16) |
9E | SERVICE ACTION IN (16) |
9F | SERVICE ACTION OUT (16) |
A0 | REPORT LUNS SCSI Report LUNs Command The Report LUNs Command is a part of the SCSI command structureThe CDB structure is:The Select Report field specifies the type of logical unit addresses to be returned.* 00h, returned list contains logical units with the following addressing methods... |
A1 | ATA COMMAND PASS THROUGH (12) |
A2 | SECURITY PROTOCOL IN |
A2 | SEND EVENT (not mentioned in T10 overview) |
A3 | REPORT SUPPORTED OPCODES |
A4 | MAINTENANCE (OUT) (REPORT_KEY) |
A5 | MOVE MEDIUM |
A5 | PLAY AUDIO 12 (not mentioned in T10 overview) |
A6 | EXCHANGE MEDIUM |
A7 | MOVE MEDIUM ATTACHED |
A8 | READ (12) |
A9 | SERVICE ACTION OUT (12) |
A9 | AUDIO TRACK RELATIVE 12 (not mentioned in T10 overview) |
AA | WRITE (12) |
AB | SERVICE ACTION IN (12) |
AC | ERASE (12) |
AD | READ DVD STRUCTURE |
AE | WRITE AND VERIFY (12) |
AF | VERIFY (12) |
B0 | SEARCH DATA HIGH (12) |
B1 | SEARCH DATA EQUAL (12) |
B2 | SEARCH DATA LOW (12) |
B3 | SET LIMITS (12) |
B4 | READ ELEMENT STATUS ATTACHED |
B5 | SECURITY PROTOCOL OUT |
B6 | SEND VOLUME TAG |
B7 | READ DEFECT DATA (12) |
B8 | READ ELEMENT STATUS |
B9 | READ CD MSF |
BA | REDUNDANCY GROUP (IN) |
BB | REDUNDANCY GROUP (OUT) |
BC | SPARE (IN) |
BC | PLAY CD (not mentioned in T10 overview) |
BD | SPARE (OUT) |
BE | VOLUME SET (IN) |
BF | VOLUME SET (OUT) |