Logical unit number (LUN)
A logical unit number (LUN) is the address of a logical unit within a SCSI target.
Entity and address: The logical unit executes I/O commands; its LUN identifies it in the target context. The same numeric LUN on different targets need not refer to the same storage. [6] [7]
Discovery: In Linux v6.12, the max_luns parameter defaults to 512 and is used by sequential scanning. REPORT LUNS takes a different path, grows its response buffer when needed and checks returned addresses against the host adapter's max_lun. The sequential setting is not a universal ceiling of 512 logical units. Device quirks, failures and configuration can affect discovery. [4]
Relations
- related
- SAN, SCSI, Block storage, iSCSI, INCITS T10 SCSI, SCSI initiator and target, Command descriptor block (CDB), SCSI logical unit (LU)
Limitations
- The address alone does not establish persistent volume identity across different targets. [7]
Citations
- Linux v6.12 scsi_scan.c: max_scsi_luns, sequential scan and REPORT LUNS
- SNIA dictionary: logical unit
- SNIA dictionary: logical unit number
Further reading
- Logical unit (LUN)
- IETF RFC 7143, Internet Small Computer System Interface (iSCSI) Protocol (Consolidated), April 2014
- The Linux Kernel documentation: SCSI Interfaces Guide (SCSI mid-layer, device scanning)
- SCSI-2 draft standard, clause 17: Medium-changer devices (mirror)
Sources & caveats
- Scanning behavior is pinned to Linux v6.12 and is an implementation example, not a maximum prescribed by SCSI.