Use this to understand the SCSI command set behind SAS, FC, iSCSI and USB storage.
SCSI
SCSI is the command set behind SAS, Fibre Channel, iSCSI and USB storage, defining initiators, targets, LUNs and commands like READ, WRITE and UNMAP, even where parallel SCSI cabling is long gone.
1. SCSI is the command set used by SAS, FC, iSCSI and USB storage.
2. Devices addressed as host:channel:target:LUN.
3. sg3_utils tools query devices.
4. Rescan after changes.
5. Persistent reservations for clusters.
initiator → SCSI commands over transport → target LUN
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Addressing Narrow the fault
Linux SCSI addresses are host:channel:target:LUN ([2:0:1:0] in lsscsi). Rescan a host after adding LUNs: echo '- - -' > /sys/class/scsi_host/host2/scan.
Step 2 Common mistakes Narrow the fault
- Rescanning the wrong SCSI host.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- SCSI defines initiators, targets and LUNs.
- Commands include READ, WRITE, UNMAP and INQUIRY.
- Sense codes explain errors.
lsscsi— SCSI devicessg_inq /dev/sdX— inquirysg_readcap /dev/sdX— capacity
ReferenceHow it works1 section · depth on demand
Commands
lsscsi
sg_inq /dev/sda
cat /sys/block/sda/device/vendor
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
SCSI defines the command model used by SAS, FC (FCP), iSCSI, USB UAS and virtual controllers: an initiator sends a CDB (command descriptor block) to a logical unit on a target, which returns data and status, with sense data on errors.
| Common command | Purpose |
|---|---|
| INQUIRY | Vendor, model, VPD pages (serial, device ID) |
| REPORT LUNS | List logical units behind a target |
| READ/WRITE(10/16) | Data transfer |
| TEST UNIT READY | Path/device check |
| UNMAP | Release blocks (thin provisioning) |
| PERSISTENT RESERVE | Cluster ownership |
sg_inq /dev/sdb; sg_luns /dev/sdb; sg_vpd -p bl /dev/sdb # block limits incl. UNMAP
Sense keys in logs (e.g. Sense Key : Medium Error, Not Ready, Unit Attention) tell you whether the problem is media, path or a state change.
SCSI today
The SCSI command set lives on in SAS, FC, iSCSI and USB Attached SCSI (UAS). Linux shows these as /dev/sdX; lsscsi lists host:channel:target:LUN. Parallel SCSI cabling is obsolete.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Storage Interfaces → SCSI. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.t10.org/ · confidence 94%