95-253r0 -- Proposed REPORT LUNS command

ROWEBER at ACM.ORG ROWEBER at ACM.ORG
Thu Jun 1 19:29:27 PDT 1995


                                                         X3T10/95-253R0

To:         Membership of X3T10

From:       Ralph O. Weber        ROWeber at ACM.org
            ENDL Associates

Date:       June 1, 1995

Subject:    Proposed REPORT LUNS command


This document proposes a mechanism by which an application client
can determine what SCSI LUNs are supported by a device server. 
The proposal capability is implemented as a new SCSI command.  This
proposal is based on a discussion at the May 1995 SCSI Working Group
meeting.  As suggested at that time, this proposal attempts (as nearly
as possible) to follow various reporting examples in the MAINTENANCE
(IN) command, as defined in the SCSI-3 Controller Commands (SCC)
document.

During the development of this proposal, it was noted that many of the
SCC commands deal with 16 bit LUNs.  To be as general as the SCSI-3
models, this proposal must deal with 64 bit LUNs.

In preparing this proposal, I found myself caught between conflicting
goals.  The Working Group specifically asked that the new command use
a 12 byte CDB.  In a 12 byte CDB, I could either provide for full use
of 64 bit LUN values or conform to the typical 12 byte CDB format
shown in the SCSI-3 Primary Commands (SPC).

In a 12 byte CDB, there are exactly enough bytes to represent the
command parameters needed by a REPORT LUNS command.  Specifically, a
REPORT LUNS needs 1 byte for operation code, 1 control byte, 8 bytes
for starting LUN value, and 2 bytes for allocation length.  This
amounts to exactly 12 bytes.

I choose to define a 12 byte CDB that does not conform to the typical
12 byte CDB format shown in the SPC.  In doing so, I rejected the
following options:

   o  Using a 16 byte CDB
   o  Sending no starting LUN value - not practical in configurations
      containing large numbers of logical units
   o  Sending all 8 bytes of LUN value - leaves no room for
      enhancements in CDB functional features

The following text is proposed for inclusion in the SPC as a new
command definition clause.


7.x REPORT LUNS command

The REPORT LUNS command (see table n1) requests that the logical unit
numbers of known physical logical units at the target be sent to the
application client.

                         Table n1 - REPORT LUNS command
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |                           Operation code (A0h)                        |
|-----+-----------------------------------------------------------------------|
| 1   |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 2   |(MSB)                                                                  |
|- - -+- -                        First LUN                                - -|
| 5   |                           Starting LUN * 2**32                   (LSB)|
|-----+-----------------------------------------------------------------------|
| 6   |(MSB)                                                                  |
|- - -+- -                        Allocation length                        - -|
| 9   |                                                                  (LSB)|
|-----+-----------------------------------------------------------------------|
| 10  |                           Reserved                                    |
|-----+-----------------------------------------------------------------------|
| 11  |                           Control                                     |
+=============================================================================+

The First LUN field shall contain high-order four bytes of the
Starting LUN value.  The Starting LUN value shall be the lowest valued
logical unit number to be reported by the device server to the
application client.  If the logical unit number value defined by the
Starting LUN value is not configured, the next larger valued logical
unit number shall be the first logical unit number reported.

The device server shall report the logical unit numbers of configured
logical units using the format shown in table n2.  The device server
shall report logical unit number values in strictly ascending numeric
value.

The Allocation length shall be at least 12 bytes.  If the Allocation
length is less than 12 bytes, the device server shall return CHECK
CONDITION status.  The sense key shall be set to ILLEGAL REQUEST and
the additional sense data shall be set to INVALID FIELD IN CDB.

The Allocation length may not be sufficient to contain the logical
unit number values for all configured logical units.  This shall not
be considered an error.  The device server shall report as many
logical unit number values as will fit in the specified Allocation
length.

                 Table n2 - LUN reporting parameter list format
+=====-========-========-========-========-========-========-========-========+
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=====+=======================================================================|
| 0   |(MSB)                                                                  |
|- - -+- -                        LUN list length (n-5)                    - -|
| 3   |                                                                  (LSB)|
|-----+-----------------------------------------------------------------------|
| 4   |                           Reserved                           | LastLUN|
|-----+-----------------------------------------------------------------------|
| 5   |                                                                       |
|=====+=======================================================================|
|     |                           LUN list (if any)                           |
|=====+=======================================================================|
| 6   |(MSB)                                                                  |
|- - -+- -                        LUN                                      - -|
| 13  |                                                                  (LSB)|
|-----+-----------------------------------------------------------------------|
|     |                           .                                           |
|     |                           .                                           |
|     |                           .                                           |
|-----+-----------------------------------------------------------------------|
| n-7 |(MSB)                                                                  |
|- - -+- -                        LUN                                      - -|
| n   |                                                                  (LSB)|
+=============================================================================+

The LastLUN bit shall be one if the LUN list contains the largest
numeric valued logical unit number in the device server's
configuration.  Otherwise, the LastLUN bit shall be zero.

The LUN list length shall contain the length in bytes of the LUN list. 
Essentially, the LUN list length is the number of logical unit numbers
reported multiplied by eight.

If no logical units are configured with logical unit numbers greater
than or equal to the contents of the CDB Starting LUN field, the
LastLUN bit shall be returned as one and the LUN list length shall be
returned as zero.^Z




More information about the T10 mailing list