Asset ID: |
1-71-1624213.1 |
Update Date: | 2017-06-19 |
Keywords: | |
Solution Type
Technical Instruction Sure
Solution
1624213.1
:
How To Determine If a Fibre Channel (FC) HBA Port Is Configured as an Initiator or Target on a Solaris Server
Related Items |
- Sun Storage FC HBA
- Emulex FC HBA
- SPARC T4-4
- Qlogic FC HBA
|
Related Categories |
- PLA-Support>Sun Systems>DISK>HBA>SN-DK: FC HBA
|
In this Document
Created from <SR 3-8535145727>
Applies to:
SPARC T4-4 - Version All Versions to All Versions [Release All Releases]
Sun Storage FC HBA - Version All Versions to All Versions [Release All Releases]
Qlogic FC HBA - Version All Versions to All Versions [Release All Releases]
Emulex FC HBA - Version All Versions to All Versions [Release All Releases]
Information in this document applies to any platform.
Goal
Fibre Channel (FC) initiator is the endpoint that initiates a session and that sends commands. Fibre Channel (FC) target is the endpoint that does not initiate sessions, but instead waits for initiators' commands and provides required input/output data transfers. The target usually provides to the initiators one or more LUNs, because otherwise no read or write command would be possible.
Most FC HBA cards are found in servers and are usually configured as a Fibre Channel (FC) initiator then connected to some type of storage via a controller (not a FC HBA) card in the storage device. But in certain uncommon situations FC HBA cards in servers can be configured as a Fibre Channel (FC) target as well.
FC HBA cards are sometimes also used in storage devices (ie. disk/nas arrays or tape libraries) instead of storage controllers cards and can be configured as either FC Initiator or Target.
Solution
On a Solaris server the following command can be used to determine how a FC HBA ports is configured - Initiator Mode or Target Mode.
luxadm -e dump_map <path>
This command will list what is seen via a specific fc hba port in the server.
Note: To see external devices FC HBA port has to be online. For Solaris 10 and above "fcinfo hba-port" command will list fc hba port state and device path. If fc hba port is not online "luxadm -e dump_map <path>" command with return error on Solaris 10 and above SPARC platforms but on Solaris 10 x86 platform it will just list internal fc hba port.
luxadm man page
...
-e dump_map fibre_channel_HBA_port
Display WWN data for a target device or host bus adapter
on the specified fibre channel port. If there are no
target devices on the specified port, an error is
returned.
The command output will list Initiators under "Type" column as
"0x1f (Unknown Type)".
If the fc hba card port is inside the server and configured as a Initiator it will be listed as
"0x1f (Unknown Type,Host Bus Adapter)".
Other "Type" categories include:
0x0 (Disk device)
0x1 (Tape device)
0xc (Array controller device)
Note: If a FC HBA card port in a external storage device is configured as a Target it will be listed as one of the "Other "Type" categories" above. Therefore, it can be mistaken for storage controller card port instead of a FC HBA card port configured as a Target.
Unless the type of device is already known the WWPN can be used to determine the type of device being seen to determine if it is a FC HBA port setup as a Target or not.
Official list of all OUIs (ie WWPN) is here.
http://standards.ieee.org/develop/regauth/oui/oui.txt
Other references on WWPN
World Wide Name - Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/World_Wide_Name
How to interpret SAN worldwide names - Computerworld
http://www.computerworld.com.au/article/54436/how_interpret_san_worldwide_names/
Use internal tool to decode the wwpn.
http://tsc-storage.us.oracle.com/products/Switch/tools.html
$ wwnmap 21000024ff4c4d70
wwnmap Version 1.2.2 (11/13/13)
21000024ff4c4d70 -> QLogic HBA: Port 1
$ luxadm -e port
/devices/pci@400/pci@2/pci@0/pci@1/pci@0/pci@2/SUNW,qlc@0/fp@0,0:devctl CONNECTED
/devices/pci@400/pci@2/pci@0/pci@1/pci@0/pci@2/SUNW,qlc@0,1/fp@0,0:devctl CONNECTED
/devices/pci@600/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0/fp@0,0:devctl CONNECTED
/devices/pci@600/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0,1/fp@0,0:devctl CONNECTED
/devices/pci@700/pci@2/pci@0/pci@3/pci@0/pci@2/SUNW,qlc@0/fp@0,0:devctl CONNECTED
/devices/pci@700/pci@2/pci@0/pci@3/pci@0/pci@2/SUNW,qlc@0,1/fp@0,0:devctl CONNECTED
/devices/pci@500/pci@1/pci@0/pci@1/pci@0/pci@2/SUNW,qlc@0/fp@0,0:devctl CONNECTED
/devices/pci@500/pci@1/pci@0/pci@1/pci@0/pci@2/SUNW,qlc@0,1/fp@0,0:devctl CONNECTED
$
$ ls -l /dev/cfg | grep qlc
lrwxrwxrwx 1 root root 72 Jun 14 2013 c10 -> ../../devices/pci@500/pci@1/pci@0/pci@1/pci@0/pci@2/SUNW,qlc@0/fp@0,0:fc
lrwxrwxrwx 1 root root 74 Jun 14 2013 c11 -> ../../devices/pci@500/pci@1/pci@0/pci@1/pci@0/pci@2/SUNW,qlc@0,1/fp@0,0:fc
lrwxrwxrwx 1 root root 72 Jun 14 2013 c12 -> ../../devices/pci@600/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0/fp@0,0:fc
lrwxrwxrwx 1 root root 74 Jun 14 2013 c13 -> ../../devices/pci@600/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0,1/fp@0,0:fc
lrwxrwxrwx 1 root root 72 Jun 14 2013 c19 -> ../../devices/pci@700/pci@2/pci@0/pci@3/pci@0/pci@2/SUNW,qlc@0/fp@0,0:fc
lrwxrwxrwx 1 root root 74 Jun 14 2013 c20 -> ../../devices/pci@700/pci@2/pci@0/pci@3/pci@0/pci@2/SUNW,qlc@0,1/fp@0,0:fc
lrwxrwxrwx 1 root root 72 Jun 14 2013 c8 -> ../../devices/pci@400/pci@2/pci@0/pci@1/pci@0/pci@2/SUNW,qlc@0/fp@0,0:fc
lrwxrwxrwx 1 root root 74 Jun 14 2013 c9 -> ../../devices/pci@400/pci@2/pci@0/pci@1/pci@0/pci@2/SUNW,qlc@0,1/fp@0,0:fc$
$ fcinfo hba-port | egrep "Device|State:"
OS Device Name: /dev/cfg/c19
State: online
OS Device Name: /dev/cfg/c20
State: online
OS Device Name: /dev/cfg/c8
State: online
OS Device Name: /dev/cfg/c9
State: online
OS Device Name: /dev/cfg/c12
State: online
OS Device Name: /dev/cfg/c13
State: online
OS Device Name: /dev/cfg/c10
State: online
OS Device Name: /dev/cfg/c11
State: online
$
Example from two of the paths above:
Output below shows a FC HBA card port (ie 0x1f (Unknown Type)) in some external storage device being seen thru the fc hba port of a fc hba card in the server (ie 0x1f (Unknown Type,Host Bus Adapter)).
Both are easily identified as fc hba cards because they are listed as Initiators.
::::::::::::::
luxadm_-e_dump_map_-devices-pci@700-pci@2-pci@0-pci@3-pci@0-pci@2-SUNW,qlc@0,1-fp@0,0:devctl.out
::::::::::::::
Pos AL_PA ID Hard_Addr Port WWN Node WWN Type
0 1 7d 0 21000xxxxxxxxxb9 20000xxxxxxxxxb9 0x1f (Unknown Type,Host Bus Adapter)
1 ef 0 0 21000xxxxxxxxx70 20000xxxxxxxxx70 0x1f (Unknown Type)
Output below shows a FC HBA card port in some external storage device being seen thru the fc hba port of a fc hba card in the server (ie 0x1f (Unknown Type,Host Bus Adapter)) but in this case the external FC HBA card port is set up in Target mode so it is listed as Type "0x0 (Disk device)".
::::::::::::::
luxadm_-e_dump_map_-devices-pci@700-pci@2-pci@0-pci@3-pci@0-pci@2-SUNW,qlc@0-fp@0,0:devctl.out
::::::::::::::
Pos AL_PA ID Hard_Addr Port WWN Node WWN Type
0 1 7d 0 21000xxxxxxxxxb8 20000xxxxxxxxxb8 0x1f (Unknown Type,Host Bus Adapter)
1 ef 0 0 21000xxxxxxxxx74 20000xxxxxxxxx74 0x0 (Disk device)
Related knowledge documents:
Determining Fibre Channel (FC) HBA World-Wide Port Number (WWPN) in Solaris (Doc ID 1301657.1)
Attachments
This solution has no attachment