SCSI REPORT LUNS
REPORT LUNS is a SCSI command that returns a SELECT REPORT-filtered inventory of logical unit numbers accessible through the requesting initiator-target nexus.
Scope: SELECT REPORT filters address classes; 02h requests all accessible LUNs, not an array-wide census. A returned LUN is an address, not a persistent device identifier. Enumeration can succeed while other commands are not ready. [1]
Completeness: LUN LIST LENGTH counts descriptor bytes, excluding the eight-byte header. The cited library's two-LUN example allocates 16 bytes and receives one eight-byte descriptor plus the header, although the length field still reports 16. An unchanged two-entry inventory needs 24 bytes in total. [2]
Reader guidance: Preserve the requested selection, nexus and actual received length. Check the header and complete descriptors before decoding; bound allocation arithmetic and re-check any larger response. A retry does not establish a stable inventory snapshot.
Host discovery: Linux v6.12 probes returned LUNs separately. Its sequential fallback may stop at a missing LUN unless sparse scanning applies; the visible host inventory depends on scan policy as well as the target's list. [3]
Relations
- related
- SCSI logical unit (LU), Logical unit number (LUN), LUN masking, SCSI initiator and target, SCSI Device Identification
Citations
- Seagate SCSI Commands Reference Rev. M (June 2022), sections 2.2.6, 3.36 and 5.4.9
- Oracle SL4000 SCSI Reference: REPORT LUNS (A0h), Select Report and Report LUNs Data
- Linux v6.12 scsi_scan.c: REPORT LUNS and sequential scanning
Sources & caveats
- Primary-source synthesis; the allocation example is documented arithmetic, not captured hardware I/O.
- Reader validation and retry guidance are engineering deductions, not a universal device retry rule.
- The host-discovery statement is source inspection at Linux v6.12, not a rescan experiment or a claim about all kernels.