Technology card
ShippingSCSI
Small Computer System Interface
Separate standards responsibilities from the storage path: command set, logical unit, port and transport.
Glossary entry on hesela.dev · JSON record · SCSI Architecture Model (SAM) · SCSI Primary Commands (SPC) · SCSI Block Commands (SBC) · Supported operation codes (RSOC) · Initiator and target · Logical unit number · SCSI status and sense interpretation · Command descriptor block · READ CAPACITY
Related
On this page6 sections
In one minute
SCSI is a family of standards for device commands, logical units, status reporting and the transports that carry them.
A SCSI command and a parallel SCSI cable are different things. The historical parallel bus is only one interconnect; Linux still uses its SCSI subsystem for several storage paths. Reading a device through that subsystem does not identify the wire protocol. [15]
SAM provides the common SCSI architecture framework. SPC describes shared device behavior, while SBC covers block-oriented direct-access devices. SSC and SMC address different device types. These are standards responsibilities, not three successive wire-protocol layers: the SPC-4 introduction explicitly warns against reading its document-family diagram as a protocol stack. [4] [13] [5]
Shared commands are not uniformly mandatory. SPC-4 clause 1 distinguishes mandatory and optional commands. Read the relevant revision and device capability documentation before assuming an operation is supported; a SCSI label or connector is insufficient. [5]
Capability discovery is a separate operation. REPORT SUPPORTED OPERATION CODES can enumerate the addressed logical unit's supported commands or query one command. Preserve the opcode, service action where applicable, and peripheral device type. In sg_opcodes, --enumerate only decodes a command name and ignores the device; a recognized name is not evidence of device support. [1]
Do not collapse unavailable support information into an unsupported-command result. Oracle's historical T10000 reference distinguishes those states and also separates standard-defined from vendor-specific support. Our operational inference: a successful report is not proof that the queried command will complete with a particular request and device state. This source describes one implementation, not every current SCSI device. [2]
Command-timeout descriptors are not latency benchmarks. The historical T10 proposal excludes certain delays outside the device server's control and warns against ranking products with these fields. Use that proposal as design rationale, not an approved standard. Consult the applicable implementation and record actual workload measurements separately. [3]
T10 does not own every transport or interconnect specification used with SCSI. Its architecture overview identifies T11 for Fibre Channel, IETF for iSCSI and USB-IF for USB. A command-standard revision therefore does not identify a physical-link generation. [6]
A draft number is not an approval status. T10 warns that working drafts can change and are not approved standards; if a draft conflicts with a published ANSI standard or technical report, the published document takes precedence. Record the exact document identifier, revision and publication status before comparing command behavior or conformance claims. [13]
An initiator issues commands to logical units through a target. A target can have multiple ports; a port is not necessarily a physical socket. The iSCSI mapping, for example, distinguishes SCSI ports from network portals. [16]
The logical unit (LU) executes I/O commands; the logical unit number (LUN) addresses it within a target. The same numeric LUN on two targets does not establish that they expose the same logical unit or backing storage. An array volume is one possible LU, not the definition of a LUN. [17] [18]
The command descriptor block (CDB) carries the command, distinct from the transferred user data. The response status and any sense information are separate evidence. In iSCSI, autosense is mandatory: error handling should not assume that CHECK CONDITION always requires a subsequent REQUEST SENSE command. [19] [16]
A zero transfer-length field has command-specific meaning. For direct-access block devices, legacy READ(6) uses a one-byte field where zero requests 256 logical blocks; READ(10) uses a two-byte block count where zero requests no logical blocks. Linux v6.12 explicitly decodes the distinction. The manual labels block READ(6) obsolete: this is an interpretation rule, not an assurance that a particular device supports it. This contrast concerns block commands, not tape READ(6). [8] [9]
With 512-byte logical blocks, READ(6) with a zero transfer-length field requests 256 x 512 = 131,072 user-data bytes. These are requested bytes, not proof of completed transfer. The sg_read manual at sg3_utils v1.48 uses zero-block READ(10), READ(12) and READ(16) for command-overhead timing and excludes READ(6) from that zero-block interpretation. When interpreting a trace or benchmark, retain the opcode, decoded count, logical block length, status and transfer accounting; a command rate alone does not establish data throughput. [8] [10]
A zero-block command test is a microbenchmark of command handling, not a measurement of application IOPS or media bandwidth. Traeger and colleagues distinguish such narrow tests from representative workloads and show how cache state and workload composition change the meaning of a result. Applying that distinction here, pair command-overhead timing with a representative workload that actually transfers data; record request sizes, concurrency and cache conditions before comparing systems. The paper does not benchmark these SCSI commands. [10] [7]
For iSCSI diagnosis, check the Response field before SCSI Status. A nonzero Response means Status is undefined and must be ignored. BUSY and TASK SET FULL do not imply CHECK CONDITION sense data. [16]
Discovery limits also need context. In Linux v6.12, max_luns defaults to 512 for the sequential-scan path; REPORT LUNS processing uses a separate host-adapter max_lun check. The 512 setting is not a universal limit on Linux SCSI volumes. Device quirks and scan configuration affect the path taken. [20]
READ CAPACITY returns a last logical block address, not a block count. For an ordinary complete range starting at LBA zero, capacity in bytes = (last LBA + 1) x logical block length. For example, last LBA 999 with 512-byte blocks describes 1,000 blocks and 512,000 bytes. Those are addressable bytes, not filesystem free space. [12]
In READ CAPACITY(10), FFFFFFFFh signals that the 32-bit result needs READ CAPACITY(16); do not accept it as an exact device size. The 16-byte CDB form also reports protection and provisioning information. Its logical block length excludes protection information and on-medium ECC, so it is not a physical-allocation measurement. [12] [11]
For zoned devices, interpret RC_BASIS before calling the returned address the end of the whole logical unit. The cited manual distinguishes 00b, the initial contiguous zone range without sequential-write-required zones, from 01b, the logical unit's final LBA. The command name alone does not establish that scope. [11]
Do not confuse a raw READ CAPACITY address with decoded tool output. In sg3_utils v1.48, sg_readcap --brief prints two hexadecimal values; the first value is already a block count. Do not add one again. For example, 0x3e8 0x200 means 1,000 blocks of 512 bytes, still 512,000 bytes. [12]
READ CAPACITY describes an interface, not the hidden media-management policy. Aghayev and colleagues explain in FAST 2017 how drive-managed SMR hides its translation layer behind a conventional block interface, while host-managed SMR exposes band-management requirements. Our interpretation: a capacity response alone does not identify the recording method or predict sustained random-write performance. This is source synthesis, not a new benchmark of current disks. [21]
Compared to neighbors
Start with the exact question. For cabling and paths, inspect the transport. For supported operations, inspect the device command set. For an error, retain status, sense and host-path evidence together.
| Question | Relevant specification or evidence | Do not substitute |
|---|---|---|
| What framework do SCSI standards share? | SAM architecture [4] | A connector or physical-link generation |
| Which behavior is shared across device types? | SPC common device model [5] | An assumption that every command is mandatory |
| Does this logical unit report command support? | REPORT SUPPORTED OPERATION CODES [1] | A decoded command name or successful execution |
| Which command model applies to direct-access blocks? | SBC device-type commands [13] | Tape or media-changer command semantics |
| How many bytes does this block range address? | READ CAPACITY address and logical block length [12] | Filesystem free space or physical allocation |
| How many user-data bytes are requested? | Decoded CDB block count x logical block length [8] | CDB byte length or measured transfer |
| What operation is requested? | CDB and command set [19] [13] | Connector name |
| Which device function executes it? | Logical unit [17] | An entire enclosure |
| How is that unit addressed? | LUN in the target context [18] | A global volume identity |
| How does the exchange travel? | Transport [13] | A media type |
| Why did the command fail? | Status and sense [16] | A cable diagnosis from status alone |
| Which units can the host discover? | Scan method and implementation limits [20] | One universal LUN-count ceiling |
Uncertainty notes
- The T10 index, SNIA definition and public SPC-4 introduction/scope support this standards map. Full restricted standards and device conformance were not reviewed; no latest-revision claim is made.
- Autosense requirements here are scoped to iSCSI RFC 7143. The scanning example is pinned to Linux v6.12, not every kernel or adapter.
Sources
- 01Doug Gilbert, sg_opcodes(8), source at 8799caa3741b2b1640970747aeb84f17dbbaad86: description, --opcode, --enumerate and --rctd · accessed 2026-11-10
- 02Oracle StorageTek T10000 Fibre Channel Interface Reference, E20425-02 (July 2011), pp. 189-194: REPORT SUPPORTED OPERATION CODES · accessed 2026-11-10
- 03Kevin Butt, T10/05-284r4 (8 November 2006), section 6.22.2: historical timeout proposal, not an approved standard · accessed 2026-11-10
- 04SNIA Dictionary: SCSI Architecture Model · accessed 2026-11-10
- 05INCITS 513-2015 (R2020), SPC-4 public preview: introduction p. xli and clause 1 p. 1 · accessed 2026-11-10
- 06T10: SCSI Standards Architecture and standards-organization responsibilities · accessed 2026-11-10
- 07Traeger et al., A Nine Year Study of File System and Storage Benchmarking, FSL-07-01, sections 3 and 12 · accessed 2026-10-28
- 08Seagate SCSI Commands Reference Manual, Rev. L (2020), sections 3.17-3.18 · accessed 2026-10-28
- 09Linux v6.12: scsi_trace_rw6 and scsi_trace_rw10 transfer-count decoding · accessed 2026-10-28
- 10sg3_utils v1.48: sg_read(8), zero-block command-overhead timing · accessed 2026-10-28
- 11Seagate SCSI Commands Reference Manual, Rev. L (2020), sections 3.24-3.25 and Table 135 · accessed 2026-10-24
- 12sg3_utils v1.48: sg_readcap(8), block counts, READ CAPACITY variants and units · accessed 2026-10-24
- 13T10 standards family: architecture, primary and device-specific commands, transports · accessed 2026-11-10
- 14Linux libATA Developer's Guide: introduction and SCSI-to-ATA translation · accessed 2026-10-20
- 15Linux SCSI Interfaces Guide: protocol versus bus and subsystem layers · accessed 2026-10-20
- 16RFC 7143: sections 4.1, 4.4.2, 10.2 and 11.4 (SCSI model, autosense and response) · accessed 2026-10-20
- 17SNIA dictionary: logical unit · accessed 2026-10-20
- 18SNIA dictionary: logical unit number · accessed 2026-10-20
- 19SNIA dictionary: Command Descriptor Block · accessed 2026-10-20
- 20Linux v6.12 scsi_scan.c: sequential scanning and REPORT LUNS · accessed 2026-10-20
- 21Aghayev et al., Evolving Ext4 for Shingled Disks, FAST 2017, sections 2.1 and 4 · accessed 2026-10-24