Christof Schmitt wrote:
> sysfs and lsscsi display the LUN as decimal number. For the FCP LUN
> 0x401040c300000000, sysfs and lsscsi display this:
> 
> $ ls -l /sys/bus/scsi/devices/
> total 0
> lrwxrwxrwx 1 root root 0 Jun 21 16:49 0:0:0:1086537744 ->
> ../../../devices/css0/0.0.0010/0.0.181d/host0/rport-0:0-0/target0:0:0/0:0:0:1086537744
> 
> $ lsscsi
> [0:0:0:1086537744]disk    IBM      2107900          .270  /dev/sda

The error here is that these are *not* LUNs.  They are some mangled
derivatives of LUNs.

You probably want that Linux' SCSI mid layer passes the LUNs through and
shows them for example in a representation format as per SAM-4 4.6.2.

Or maybe you want that all the different transport layer implementations
expose their target port identifiers + logical unit identifiers (and
perhaps also initiator port identifiers) in their transport-dependent
formats but in a unified sysfs attribute.

For example, the SCSI midlayer H:C:T:L tuple is useless for
SBP-2-attached devices.  What is useful is the ieee1394_id sysfs
attribute which we expose as a scsi_device's sysfs attribute.  This
attribute was something implementation-defined until now, but I changed
it to the concatenation of target port identifier and logical unit
identifier for Linux 2.6.22, as per SAM(-4) annex A.  (That change is
merely an alternative format for the old sbp2 driver and the only format
for the new fw-sbp2 driver.)

Or did I miss something and there is already a mechanism for transports
to expose target/LU identifiers?  So that userland doesn't have to care
what transport it is, except as far as the details of the identifiers'
formats are concerned?
-- 
Stefan Richter
-=====-=-=== -==- =-=-=
http://arcgraph.de/sr/
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to