.fo off .pl 64 .tm 0 .bm 0 Date: Oct 25,1993 X3T9.2/93-161 rev 0 To: X3T9.2 Committee (SCSI) From: George Penokie (IBM) Subject: SCSI-3 Addressing 1.0 Overview SCSI-2 only allows seven Logical Units to be addressed under a single Target. SCSI-3 parallel has expanded this to 64 Logical Units by using two additional bits in the Identify message. However, 64 Logical Units is not enough to handle SCSI Disk Arrays. SAM has defined a 64 bit address space for Logical Units and this address space is being used by the SCSI-3 serial interfaces. SCSI-3 parallel needs a way use the 64 bit address space. This proposal defines two methods for SCSI-3 parallel to take advantage of the expanded address space. One method uses the existing six bit address space as a pointer into a translation table that contains 64 bit addresses. This method preserves hardware at the expense of complexity. The other method defines a new Extended Identify message which contains the full 64 bit address space. This method requires hardware changes. This proposal also covers a proposed method of addressing the multiple layers which are created with SDA devices. This method uses the 64 bit address space to, not only address the device, but to also indicate the location of the device within the tree structure of a SDA device. 2.0 Base Device Address All targets shall accept LUN 0 as an address. For targets that have more than one logical unit, logical unit zero shall be the logical unit that an application client addresses to determine information about the target and the logical units attached to it. 3.0 Translation Table Addressing This method uses a translation table to address devices. The translation table is defined using Mode Sense/Select commands. When translation addressing is active logical unit addresses 1-63 shall each point to a specific eight byte location within a translation table. The eight byte location shall then be used by the target to determine to which bus/target/LUN to send the command. .pa The definition of this mode page follows: Table x: Address Translation Page ----------------------------------------------------------------------------- Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte| | | | | | | | | ----------------------------------------------------------------------------- 0 | PS |Reserved| Page Code (xxh) | ----+-----------------------------------------------------------------------| 1 | | ----+--- Page Length (01F9h) ---| 2 | | ----+-----------------------------------------------------------------------| 3 | Reserved |Active | ----+-----------------------------------------------------------------------| 4 | (MSB) | ----+--- LUN 1 Address Translation ---| 11 | (LSB) | ----------------------------------------------------------------------------- 12 | (MSB) | ----+--- LUN 2 Address Translation ---| 19 | (LSB) | ----------------------------------------------------------------------------- 504| (MSB) | ----+--- LUN 63 Address Tranlsation ---| 511| (LSB) | ----------------------------------------------------------------------------- When translation addressing is active, logical unit addresses 1-63 shall each point to a specific eight byte location within a translation table. The eight byte location shall then be used by the target to determine to which bus/target/LUN to send the command. An Active bit of zero indicates the translation table shall not be used. An Active bit one indicate that the translation table shall be used to determine to which bus/target/LUN to send the command. The LUN xx Address Translation fields contain eight byte the bus/target/LUN of the device to be addressed. The layout of this field is defined in section 5.0. 4.0 Expanded Identify Message Message Codes Code Support Message Name Direction Negate ATN Init Targ before last ACK ------------------------------------------------------------- BFh O O EXPANDED IDENTIFY In ---- BFh O O EXPANDED IDENTIFY Out No ------------------------------------------------------------- The EXPANDED IDENTIFY message is sent by either the initiator or the target to establish an I_T_L nexus. For dual port implementations: if the target disconnects from the bus during an I/O process, it shall reconnect through the same port when the I/O process is continued. EXPANDED IDENTIFY message format ------------------------------------------------------------- | Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |Byte| | | | | | | | | ------------------------------------------------------------- | | | | 0 | Expanded Identify | | | | ------------------------------------------------------------- | | | | 1 | (MSB) | | | | --------- LUN ---- | | | | 8 | (LSB) | | | | ------------------------------------------------------------- The logical unit number (LUN) field specifies the 8-byte logical unit number address of the destination logical unit. Only one logical unit number shall be identified per I/O process. The initiator may send one or more EXPANDED IDENTIFY messages during a connection. A second EXPANDED IDENTIFY message with a different value in the LUN field shall not be issued before a BUS FREE phase has occurred; if a target receives a second EXPANDED IDENTIFY message with a different value in this field, it shall issue a Bus Free Request (see Unexpected Bus Free condition, 5.1.3). Thus an initiator may change the DiscPriv bit, but may not attempt to switch to another I/O process. (See the DTDC field of the disconnect-reconnect mode page in the SCSI-3 Command Set for additional controls over disconnection.) An implied RESTORE POINTERS message shall be performed by the initiator in response to a message in indication for an EXPANDED IDENTIFY message sent during reconnection. 5.0 8-byte Logical Unit Number structure The logical unit number (LUN) allows up to four levels of devices to be addressed under a single target. Each level shall use bytes 0-1 to define the address and/or location of the SCSI device to be addressed. If the LUN indicates that the command is to be passed to the next layer then the SCSI device shall use bytes 0-1 for the LUN field to determine the LUI to send the command. When the command is sent to the target the LUN value that was received shall be adjusted as follows: .pa Byte Position Old New 0 - 1 Not Used 2 - 3 Moves to 0 - 1 4 - 5 Moves to 2 - 3 6 - 7 Moves to 4 - 5 Bytes six and seven of the new LUN value shall be set to zero. ------------------------------------------------------------- | Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |Byte| | | | | | | | | ------------------------------------------------------------- | | | | 0 | | | | | --------- 1st Level Addressing ---- | | | | 1 | | | | | ------------------------------------------------------------- | | | | 2 | | | | | --------- 2nd Level Addressing ---- | | | | 3 | | | | | ------------------------------------------------------------- | | | | 4 | | | | | --------- 3rd Level Addressing ---- | | | | 5 | | | | | ------------------------------------------------------------- | | | | 6 | | | | | --------- 4th Level Addressing ---- | | | | 7 | | | | | ------------------------------------------------------------- The nth level addressing field is defined as follows: ----------------------------------------------------------------------------- Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte| | | | | | | | | ----------------------------------------------------------------------------- n | Address Method | LUN/Bus Number | ----+------------------------------------------------------------------------ n+1| LUN/Target | ----------------------------------------------------------------------------- The value of the address method field determines the contents of the remaining 14 bits of the nth level addressing field. The following defines the address methods: Bit 7 6 Description 0 0 Physical Logical Units 0 1 Volume Logical Units 1 0 Reserved 1 1 Reserved Physical logical units are either logical units that are located within the current level or logical units that require the received command to be sent to another target for execution. When this address method is indicated bits 5-0 of byte n shall indicate a bus number. If the bus number is zero then byte n+1 shall be the LUN address of a logical unit located within the current level. If the bus number is greater than zero then byte n+1 shall indicate a target address and the bus number and target together indicate which SCSI device the command is to be sent for further processing. Volume logical units are logical units that are controlled by the current level and require one or more accesses to other targets to execute the command. Volumes shall only be accepted on SDA device types. See SCSI Disk Array Model for a complete description of the rules for using volumes. When this address method is indicated bits 5-0 of byte n and 7-0 of byte n=1 shall be the LUN address. Bit 5 byte n shall be the MSB and Bit 0 byte n+1 shall be the LSB. 6.0 Addressing Examples Using the Address convention: M/P/T where M is a two bit quantity, P is a six bit quantity, and T is an eight bit quantity. and multiple layers are separated by colons ":" and u means unused and should be zero. and m/n is a 14 bit number catenating the P and L fields Note that P is a value that starts at one, since the zero value is reserved for the SDA and stuff that has no external path. Note that T is a value that starts at zero and is limited to one less than the number of attachable SCSI devices, since the path initiator's address is also included in that address space. Example 1: Addressing the first layer SDA (for all control, creation, management functions and for identify) 0/0/0:u/u/u:u/u/u:u/u/u Addresses will appear on the first level paths as required by the function. Example 2: Addressing a fan at address 7 within the the first layer SDA (a SCSI device not physically on an identifiable SCSI path, or if you prefer, a LUN of the SDA controller itself. 0/0/7:u/u/u:u/u/u:u/u/u No first level path will be used. Example 3: Addressing a local PLUI The address of the second drive on the third path would be: 0/3/1:0/0/0:u/u/u:u/u/u The second level path would use path 3 to access target 1. The LUN value of 0 would be taken from the 0/0/0. Note that there is an assumption here that the method of emitting the LUN value is known. For example, the LUN value of 0 on an 8-byte identify, and FCP, or an SBP would be 0/0/0:0/0/0:0/0/0:0/0/0 while a standard parallel SCSI would use: 0 (= low order 5 bits of 0/n/m) Example 4: Addressing any VLUI controlled by the first SDA (including VLUI's constructed from virtual or physical volumes defined by lower SDA's) 1/n/m:u/u/u:u/u/u:u/u/u Addresses will appear on the first level paths as required by the function. Example 5: Addressing an SDA at the second layer of the hierarchy. Note that the second layer SDA is also a physical target on the first layer path. Let's say the SDA is on the fourth path and third target address. 0/4/2:0/0/0:u/u/u:u/u/u A LUN address of the following form would be emitted on the fourth path to target address 2 (following your shift the address rules) to get at the SDA. 0/0/0:u/u/u:u/u/u:u/u/u Example 6: Addressing a PLUI of the above second level SDA (say the second drive on the third path of that second level SDA). 0/4/2:0/3/1:0/0/0:u/u/u The LUN address emitted on the fourth path to target address 2 (following your shift the address rules). This PLUI could be used as a component of a VLUI defined by the first level SDA or the second level SDA. 0/3/1:0/0/0:u/u/u:u/u/u The LUN address emitted on the third path of the second level SDA to target address 1 would be 0, taken from the 0/0/0 value. Example 7: Addressing any VLUI of the above second level SDA. Note that the second level SDA's entry path is being addressed directly. This VLUI could be used as a component of a VLUI defined by the first layer SDA, although I would guess this would not necessarily be common. 0/4/2:1/n/m:u/u/u:u/u/u Address emitted on the fourth path to target address 2 (following your shift the address rules). This is a standard VLUI address. 1/n/m:u/u/u:u/u/u:u/u/u Addresses will appear on the second level paths as required by the function. Example 8: Addressing a PLUI that has real LUN's behind a standard target. As an example, let's consider LUN 4 behind the second target on the third path of the first level SDA. 0/3/1:0/0/4:u/u/u:u/u/u Note that the LUN address emitted on the third first level path to target 4 is taken from the same place as it normally would be taken. The value would be 0/0/4 (or 4). This is analagous to the fan case, above. Example 9: Note that the fourth layer devices must be single LUN devices. As a PLUI addressing example, if the first layer was P=3,T=7; the second layer was P=4, T=6; the third layer was P=1, T=5; and the fourth layer was P=7, T=2 then the address would be: 0/3/7:0/4/6:0/1/5:0/7/2{:0/0/0} the fifth layer must be understood to have only single LUN devices in it. As we shift down we see: The LUN issued on the first layer path 3, target 7 would be: 0/4/6:0/1/5:0/6/2:0/0/0 The LUN issued on the second layer path 4, target 6 would be: 0/1/5:0/6/2:0/0/0:u/u/u The LUN issued on the third layer path 1, target 5 would be: 0/6/2:0/0/0:u/u/u:u/u/u The LUN issued on the fourth layer path 6, target 2 would necessarily be: LUN = 0 (or 0/0/0:0/0/0:0/0/0:0/0/0 if it were a directly attached FCP drive).