4.2 Addressing Methods for HP-UX
As mentioned previously, there are three methods used by HP-UX for Fibre Channel addressing in order to work around the HP-UX limitations  .
Figure 4-5. Addressing Methods
The Fibre Channel Protocol (FCP) has a very large address space mapped onto the parallel SCSI address model of HP-UX. The FCP portion of the SCSI subsystem on HP-UX handles the large target address space associated with Fibre Channel by creating multiple virtual SCSI buses.
The FCP LUN ID is 8 bytes in length. All LUN addressing is done in the first two bytes. The control port of a device with an addressable controller uses Peripheral Device addressing.
Hewlett-Packard's 30-slot Fibre Channel disk array is not a true array. It does not have an addressable control port. Each LUN is addressed as though it were directly attached.
4.2.1 Hardware Path for Fibre Channel Addressing
Figure 4-6. Hardware Path
Addressing begins as it would on any Hewlett-Packard computer system. The Bus converter and HBA addresses have the same format and meanings as on all previous Hewlett-Packard products. However, the protocol type, area and port have been added for use with Fibre Channel. The protocol type is "8" for mass storage and "5" for networking. For Fibre Channel mass storage devices, the protocol type will always be "8."
The Area is always "0" for private loop. The Port is not always "0" and will be covered in following pages.
The HBA takes the highest soft address on the loop. This address does not show up in the hardware path. A soft address is an address used if there are duplicate hard addresses on a loop. Devices on a loop must not be allowed to acquire a soft address because of the possibility that a device could acquire a different soft address if power fails for a device on a loop and later is restored. For more information refer to the section "Hard versus Soft Addresses" at the end of this chapter.
A Hewlett-Packard FC-AL hub does not have a Fibre Channel address and is therefore not seen in an ioscan output. The hub is a pass-through device that increases reliability by electrically bypassing nodes that are causing problems on the loop and has no loop address of its own.
4.2.2 Peripheral Device Addressing
This addressing method is used for addressing the FC-SCSI MUX (discussed in Chapter 5), controller, and certain other Fibre Channel array controllers. The Hewlett-Packard High-Availability Fibre Channel Disk Array (HA FC Disk Array) also uses this type of addressing for its controller. This type of addressing is also used for targets with eight or fewer LUNs.
Peripheral device addressing is used with devices that do not specify a device type of array controller for LUN0 and do not use Logical Unit addressing or Volume Set addressing. This addressing method is specified by the Private Loop Device Attach profile standard. Although the profile is an 8-bit LUN field HP-UX limits the address to values 0 through 7.
188.8.131.52 Loop Addressing in ioscan
The HA FC disk array uses Peripheral Device addressing exclusively. The loop address for this device must be set physically. There are switches on the controllers that accomplish this. These switches are set in hexadecimal values. The hardware path displays this address as two separate fields (called nibbles , they are half a byte each) in decimal.
For example, the loop address is set by using the device switches, located on the controller face-plate. These switches have hexadecimal values. For this example the switches are set at 3C. The decimal value is then derived by separating the two characters , converting from HEX, and then separating them with a period. See Figure 4-7.
Figure 4-7. Nibble Conversion of Loop Address on a 30-Slot Array
The hardware path for the device shows each nibble as a decimal value separated by a period.
Figure 4-8. Example of LUN using Peripheral Device Addressing
This example shows LUN 0 with a loop address of decimal 60. The Loop address is represented in the Bus and Target fields. The HEX 3C is converted to a decimal 60.
Figure 4-9. Hewlett-Packard HA FC Disk Array
In this example, LUN 0 is an addressable device and not the control port. The Hewlett-Packard HA FC Disk Array uses Peripheral Device addressing exclusive ly.
Figure 4-10 is an example ioscan for a disk array.
Figure 4-10 Example of an ioscan
Class I H/W Path Driver S/W State H/W Type 4 Description ============================================================================== fcp 0 8/12.8 fcp CLAIMED INTERFACE FCP Protocol Adapter ext_bus 10 8/184.108.40.206.3 fcpdev CLAIMED INTERFACE FCP Device Interface target 8 8/220.127.116.11.3.12 tgt CLAIMED DEVICE disk 76 8/18.104.22.168.3.12.1 sdisk CLAIMED DEVICE DGC C3400WDR5 disk 77 8/22.214.171.124.3.12.2 sdisk CLAIMED DEVICE DGC C3400WDR5
126.96.36.199 Loop Addressing in Grid Manager
When using the Hewlett-Packard HA FC Disk Array remember the Loop ID must be set using the switches in the back of the unit located on the controllers. In our examples the Loop ID of 3C is used. When displaying this in Grid Manager, is shows up as the decimal number 60. This conversion uses the normal HEX to decimal conversion.
If the switches are set to something other than 3C, remember to make the conversion from HEX to decimal. For example, if the switches are set to 2C, then the HEX conversion will be 44 in decimal.
4.2.3 Logical Unit Addressing
This addressing method is used for addressing the SCSI devices attached to the FC-SCSI MUX. Remember, the MUX itself uses Peripheral Device addressing. It has an addressable control port, however, the devices attached to the MUX will use Logical Unit addressing.
HP-UX selects the Logical Unit addressing method based on inquiry data and LUN information returned by the REPORT LUNS command. HP-UX limits the target addresses to addresses 0 through 15 and LUN addresses 0 through 7. The address specifies a bus number (3 bits), a target number (6 bits), and a LUN (5 bits).
Each SCSI bus on the MUX is represented by a separate virtual bus on HP-UX. The MUX control port resides on a different virtual bus than its attached devices. See Figure 4-11 for an example.
Figure 4-11. Example of Logical Unit Addressing
What this figure shows is the MUX has its own address (8/188.8.131.52.2.12.0), with a loop address of HEX 2C or decimal 44, using Peripheral Device Addressing.
While on virtual SCSI bus 3, target 0, LUN 0 has it's own address (8/184.108.40.206.3.0.0), and LUN 1 of target 15 has its own address, (8/220.127.116.11.3.15.1) using Logical Unit Addressing.
18.104.22.168 Deriving the MUX loop address
The Port field from the path of a device attached to the MUX is first translated into HEX. Next , the HEX numbers are separated into the Bus and Target fields, and, finally, the numbers are converted back to decimal. See Figure 4-12 for the example.
Figure 4-12. Example for Converting the MUX Loop Address
This procedure for conversion is primarily used during troubleshooting to determine the hard address of the MUX.
The next example shows the hardware path of the FC-SCSI MUX control port. The value of 255 in the Bus field indicates that the MUX control port uses the Peripheral Device addressing method and is directly connected to an FC device. Compare with Figure 4-11.
Figure 4-13. Hardware Path for the MUX Control Port
The next example shows the resulting hardware path for a device attached to SCSI bus 3 on the MUX. Again, compare with Figure 4-11.
Figure 4-14. Example Hardware Path for a Device on MUX bus 3
The Bus field in the LUN hardware path is the SCSI bus number on the MUX. The Port field in the LUN hardware path is the loop address in decimal.
The hardware path for the MUX control port contains the loop address in the Bus and Target fields.
Figure 4-15 Example MUX ioscan with Attached Devices
#i oscan - f n Class I H/W Path Driver S/W State H/W Type Description ============================================================================================================= fcp 0 8/8.8 fcp CLAIMED INTERFACE FCP Protocol Adapter ext _bus 12 8/ 8. 8. 0. 44. 0 fcpmux CLAIMED INTERFACE HP A3 3 0 8 F CP- SCSI MUX Interface target 17 8/ 8. 8. 0. 44. 0.4 tgt CLAIMED DEVICE tape 1 8/ 8. 8. 0. 44. 0. 4.0 stape CLAIMED DEVICE Quantum DLT4000 /dev/rmt/1m /dev/r mt/c 12t 4d0BEST /dev/rmt/1mb /dev/r mt/c 12t 4d0BESTb /dev/rmt/1mn /dev/r mt/c 12t 4d0BESTn /dev/rmt/1mmnb /dev/r mt/c 12t 4d0BESTnb . . . ext _bus 16 8/ 8. 8. 0. 255.2 fcpdev CLAIMED INTERFACE FCP Device Interface target 28 8/ 8. 8. 0. 255. 2. 12 tgt CLAIMED DEVICE ctl 12 8/ 8. 8. 0. 255. 2. 12.0 sctl CLAIMED DEVICE HP HPA3308
4.2.4 Volume Set Addressing
This addressing method is used primarily for addressing virtual busses , targets, and LUNs. The HP-UX operating system selects the Volume Set addressing method based on inquiry data and LUN information returned by the SCSI-3 REPORT LUNs command.
A 14-bit volume number supports up to 16,384 LUNs for a single FCP target:
For example, in Volume Set addressing, the control port of a Fibre Channel Disk Array uses Peripheral Device addressing and the LUNs (also known as volumes ) will use Volume Set addressing.
What Figure 4-16 shows is that the FC disk array has a peripheral device address of 8/22.214.171.124.2.8.0 and LUN number 179 has a volume set address of 8/126.96.36.199.1.6.3. The address of the LUN number incorporates the loop address number of 40. The following sections describe how to interrupt this addressing scheme.
Figure 4-16. Example of Volume Set Addressing
188.8.131.52 Deriving the Volume Set Address
Using the example in Figure 4-16, for LUN number 179 the following conversion can be done.
Figure 4-17. Example of Deriving Loop Address using Volume Set Addressing
The bus and target fields are used in the hardware path of the Fibre Channel array controller to represent the loop address. Also remember that all hardware paths with Port=255 use the Peripheral Devices addressing method. Also, in this example the zero at the end of the string represents the LUN number.
Figure 4-18. Deriving a LUN Hardware Path
Again using the example in Figure 4-16, the following conversion takes place.
If a calculator is not available to perform the hexadecimal or binary conversions, divide the decimal value by 16 and convert the result to hexadecimal. Then convert the remainder to hexadecimal. For our example, refer to Figure 4-16, the ioscan for LUN 179 would shows as follows .
Figure 4-19. Final Hardware Path for LUN 179
4.2.5 Hard versus Soft Addresses
The FC-AL protocol allows for soft addresses to be assigned to devices if duplicate hard addresses are found on the loop. However, it is best to avoid allowing devices to acquire a soft address. The only way to avoid allowing devices to acquire a soft address is to make sure that all devices have unique hard addresses before they are attached to the loop.
Create a loop map and verify that any device added has a different hard address than devices already on the loop. It really is worth repeating, Make sure all devices attached to the loop have a unique hard address. Always run an ioscan after attaching a device to confirm that the device obtained its hard address.
For example, one array with address 3C attached to an FCA poses no problem. And two arrays, each with address 3C, attached to two FCAs pose no problem. However, two arrays, each with address 3C, attached to a hub will pose a problem. One will have a hard address and the other will be assigned a soft address. The first array to acquire the loop will receive its hard address and the second array will be assigned a soft address because the loop will see a duplicate hard address.
After a disconnect or a power off condition, the loop may initialize with "flip-flopped" addresses. This can produce data corruption. Upon power on the array that had the soft address may acquire the loop first and receive its hard address and the array that had the hard address before the power off condition now will be assigned a soft address. The data stored on that device when it had a hard address is no longer accessible or even know to the system because of the address "flip-flop."
To prevent this condition assign each device a unique hard address.