LUN
Cheat sheet · https://pcornel.dk/topic.php?topic=4069
Answer
A LUN number identifies a logical unit within a target context, while persistent identifiers such as serial/WWID-style values are used by hosts to recognize the same underlying device across paths. Arrays map that logical unit to selected initiators.
Remember
- LUN number ≠ globally unique identifier.
- Same capacity ≠ same LUN.
- Multiple path devices with one persistent ID ≠ duplicate storage.
- Visible LUN ≠ safe-to-format or mount.
First checks
lsscsi -s— LUN sizessg_readcap /dev/sdX— capacityecho 1 > /sys/block/sdX/device/rescan— rescan after resize
Verify in this order
array volume → LUN id → host disk
Where it usually breaks
First mismatch in initiator → link/fabric/network → session/login → target port → LUN/namespace presentation → multipath → block consumer; preserve identity/pre-state before mutation.
SAN → LUN SAN/iSCSI map
| SAN/iSCSI boundary | What to verify | Proof limit |
|---|---|---|
| Identity / presentation | Initiator + target identity, portal/fabric path, LUN stable ID and mapping | Discovery or login alone does not prove correct storage ownership |
| Path / transport | Link/VLAN/IP/TCP or fabric state, path independence, session/path errors and multipath grouping | One reachable path does not prove resilience or backend health |
| Failure boundary | A LUN visible on the host proves presentation of a block object; it does not prove its identity by capacity alone, filesystem safety or redundancy. | Correlate host, network/fabric and target/array evidence for the same time window |
| Acceptance | Healthy evidence: array and host agree on persistent identity/capacity, all expected paths group to one device and upper ownership is documented. | Close only after the original block workload and upper-layer consistency check succeeds |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4069