1

I'm trying to understand the low-level details of SCSI. The SCSI standards (such as the SAM-5 SCSI Architecture document) state that a single SCSI device can have multiple "target ports", and also multiple "logical units". When an initiator sends a request to read/write data to a target, it needs to specify both the desired target port and the logical unit number.

It seems that either just a port number or just a logical unit number would be enough to perform the needed multiplexing, so a single SCSI interface can provide access to multiple data sources/sinks.

Do SCSI devices in the real world actually provide multiple target ports and multiple logical units?

If you can provide an example of a device which has multiple target ports, and one which has multiple logical units, giving an idea of what ports/LUNs are used for in practice, that would be very helpful.

Alex D
  • 29,755
  • 7
  • 80
  • 126

1 Answers1

1

Any SAN device provides multiple ports (multiple FC ports and/or multiple iSCSI ports) and also provides multiple LUNs over each of these ports. The exposed LUNs may differ from port to port and the mapping of LUN ID to a volume may differ between the ports so LUN 1 may be volume 23 on port FC1 and LUN 3 on port iSCSI 2.

The port is the physical connection to the world. The LUN is a logical identifier for a volume on a port. The volume is the logical entity that is exposed to the world through the LUN and port mappings.

Baruch Even
  • 2,581
  • 1
  • 17
  • 23
  • Thanks! So when the SCSI standards refer to a device having multiple "target ports", that means it will actually have multiple physical connections to the underlying bus/network? – Alex D Nov 04 '14 at 12:11
  • Yes, multiple ports (target or initiator) mean multiple physical connections to the same fabric. Sometimes you can get multiple logical connections too and they may also be considered different ports. Consider VLANs and different IP/Port for iSCSI. – Baruch Even Nov 06 '14 at 08:49
  • The same logical unit can be exposed to the world via multiple physical ports, right? It's called a multi-path I/O. Please see http://en.wikipedia.org/wiki/Multipath_I/O. Do I understand that correctly? – HEKTO Nov 07 '14 at 15:16
  • Yes. A single LUN can be exposed through multiple ports for multipathing. – Baruch Even Nov 07 '14 at 18:33