Jump to content

SCSI command: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
SCSI is not limited to storage
Removing link(s) to "SCSI Status Code": Removing links to deleted page SCSI Status Code.
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{Short description|Commands for controlling computer devices}}
{{Short description|Commands for controlling computer devices}}
<!-- Please do not remove or change this AfD message until the discussion has been closed. -->
{{AfDM|page=SCSI command (2nd nomination)|year=2024|month=November|day=18|substed=yes|origtag=afdx|help=off}}
<!-- End of AfD message, feel free to edit beyond this point -->
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 [[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 [[SCSI initiator|initiator]] sends a '''SCSI command information unit''' to the [[SCSI target|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.
In the SCSI protocol, the [[SCSI initiator|initiator]] sends a '''SCSI command information unit''' to the [[SCSI target|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 [[SCSI CDB|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 [[SCSI Status Code|status code]] byte and other information.
SCSI commands are sent in a [[SCSI CDB|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 {{mono|0x01}} recalibrates a disk drive by seeking back to physical sector zero, but rewinds the medium in a tape drive.
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 {{mono|0x01}} recalibrates a disk drive by seeking back to physical sector zero, but rewinds the medium in a tape drive.

Latest revision as of 18:57, 25 November 2024

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

[edit]

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

[edit]

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
00 TEST UNIT READY
01 REWIND
03 REQUEST SENSE
04 FORMAT
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
13 VERIFY(6)
14 RECOVER BUFFERED DATA
15 MODE SELECT(6)
16 RESERVE(6)
17 RELEASE(6)
18 COPY
19 ERASE (6)
1A MODE SENSE (6)
1B START STOP UNIT
1B LOAD UNLOAD
1C RECEIVE DIAGNOSTIC RESULTS
1D SEND DIAGNOSTIC
1E PREVENT ALLOW MEDIUM REMOVAL
23 READ FORMAT CAPACITIES
25 READ CAPACITY(10)
28 READ(10)
29 READ GENERATION
2A WRITE(10)
2B SEEK(10)
2B LOCATE(10)
2C ERASE(10)
2D READ UPDATED BLOCK
2E WRITE AND VERIFY(10)
2F VERIFY(10)
33 SET LIMITS(10)
34 PRE-FETCH(10)
34 READ POSITION
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(10)
3F WRITE LONG(10)
40 CHANGE DEFINITION
41 WRITE SAME(10)
42 UNMAP
43 READ TOC/PMA/ATIP
44 REPORT DENSITY SUPPORT
45 PLAY AUDIO(10)
46 GET CONFIGURATION
47 PLAY AUDIO MSF
48 SANITIZE
4A GET EVENT STATUS NOTIFICATION
4B PAUSE/RESUME
4C LOG SELECT
4D LOG SENSE
50 XDWRITE(10)
51 XPWRITE(10)
51 READ DISC INFORMATION
52 XDREAD(10)
53 XDWRITEREAD(10)
54 SEND OPC INFORMATION
55 MODE SELECT(10)
56 RESERVE(10)
57 RELEASE(10)
58 REPAIR TRACK
5A MODE SENSE(10)
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 READ REVERSE(16)
83 Third-party Copy OUT commands
84 Third-party Copy IN commands
85 ATA 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)
92 LOCATE(16)
93 WRITE SAME(16)
93 ERASE(16)
9D SERVICE ACTION BIDIRECTIONAL
9E SERVICE ACTION IN(16)
9F SERVICE ACTION OUT(16)
A0 REPORT LUNS
A1 ATA PASS-THROUGH(12)
A2 SECURITY PROTOCOL IN
A3 MAINTENANCE IN
A4 MAINTENANCE OUT
A4 REPORT KEY
A5 MOVE MEDIUM
A5 PLAY AUDIO 12
A6 EXCHANGE MEDIUM
A7 MOVE MEDIUM ATTACHED
A8 READ(12)
A9 SERVICE ACTION OUT(12)
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)
BD SPARE (OUT)
BE VOLUME SET (IN)
BF VOLUME SET (OUT)
[edit]
  • Summary of SCSI command operation codes
  • "SCSI Commands Reference Manual" (PDF). Seagate.