如何在Solaris系统上查看HBA卡WWN号(转)

原文参见:

http://www.sunsolarisadmin.com/hardware/how-to-find-the-wwn-world-wide-name-in-sun-solaris

 

World Wide Name (WWN) are unique 8 byte (64-bit) identifiers in SCSI or fibre channel similar to that of MAC Addresses on a Network Interface Card (NIC).

Talking about the WWN names, there are also

World Wide port Name (WWpN), a WWN assigned to a port on a Fabric which is what you would be looking for most of the time.

World Wide node Name (WWnN), a WWN assigned to a node/device on a Fibre Channel fabric.

To find the WWN numbers of your HBA card in Sun Solaris, you can use one the following procedures

Using fcinfo (Solaris 10 only)

This is probably the easiest way to find the WWN numbers on your HBA card. Here you can see the HBA Port WWN (WWpN) and the Node WWN (WWnN) of the two ports on the installed Qlogic HAB card.

This is also useful in finding the Model number, Firmwar version FCode, supported and current speeds and the port status of the HBA card/port.

root@ sunserver:/root# fcinfo hba-port | grep WWN
HBA Port WWN: 2100001b32xxxxxx
Node WWN: 2000001b32xxxxxx
HBA Port WWN: 2101001b32yyyyyy
Node WWN: 2001001b32yyyyyy

For detailed info including Make & model number, Firmware, Fcode and current status and supported/current speeds then

root@ sunserver:/root# fcinfo hba-port
HBA Port WWN: 2100001b32xxxxxx
OS Device Name: /dev/cfg/c2
Manufacturer: QLogic Corp.
Model: 375-3356-02
Firmware Version: 4.04.01
FCode/BIOS Version:  BIOS: 1.24; fcode: 1.24; EFI: 1.8;
Type: N-port
State: online
Supported Speeds: 1Gb 2Gb 4Gb
Current Speed: 4Gb
Node WWN: 2000001b32xxxxxx
HBA Port WWN: 2101001b32yyyyyy
OS Device Name: /dev/cfg/c3
Manufacturer: QLogic Corp.
Model: 375-3356-02
Firmware Version: 4.04.01
FCode/BIOS Version:  BIOS: 1.24; fcode: 1.24; EFI: 1.8;
Type: unknown
State: offline
Supported Speeds: 1Gb 2Gb 4Gb
Current Speed: not established
Node WWN: 2001001b32yyyyyy

Using scli

root@ sunserver:/root# scli -i | egrep “Node Name|Port Name”
Node Name                  : 20-00-00-1B-32-XX-XX-XX
Port Name                  : 21-00-00-1B-32-XX-XX-XX
Node Name                  : 20-01-00-1B-32-YY-YY-YY
Port Name                  : 21-01-00-1B-32-YY-YY-YY

For more detailed info on the HBA Cards run as follows: Similar to fcinfo but also provides Model Name and serial number.

root@ sunserver:/root# scli -i
——————————————————————————
Host Name                  : sunserver
HBA Model                  : QLE2462
HBA Alias                  :
Port                       : 1
Port Alias                 :
Node Name                  : 20-00-00-1B-32-XX-XX-XX
Port Name                  : 21-00-00-1B-32-XX-XX-XX
Port ID                    : 11-22-33
Serial Number              : AAAAAAA-bbbbbbbbbb
Driver Version             : qlc-20080514-2.28
FCode Version              : 1.24
Firmware Version           : 4.04.01
HBA Instance               : 2
OS Instance                : 2
HBA ID                     : 2-QLE2462
OptionROM BIOS Version     : 1.24
OptionROM FCode Version    : 1.24
OptionROM EFI Version      : 1.08
OptionROM Firmware Version : 4.00.26
Actual Connection Mode     : Point to Point
Actual Data Rate           : 2 Gbps
PortType (Topology)        : NPort
Total Number of Devices    : 2
HBA Status                 : Online
——————————————————————————
Host Name                  : sunserver
HBA Model                  : QLE2462
HBA Alias                  :
Port                       : 2
Port Alias                 :
Node Name                  : 20-01-00-1B-32-YY-YY-YY
Port Name                  : 21-01-00-1B-32-YY-YY-YY
Port ID                    : 00-00-00
Serial Number              : AAAAAAA-bbbbbbbbbb
Driver Version             : qlc-20080514-2.28
FCode Version              : 1.24
Firmware Version           : 4.04.01
HBA Instance               : 3
OS Instance                : 3
HBA ID                     : 3-QLE2462
OptionROM BIOS Version     : 1.24
OptionROM FCode Version    : 1.24
OptionROM EFI Version      : 1.08
OptionROM Firmware Version : 4.00.26
Actual Connection Mode     : Unknown
Actual Data Rate           : Unknown
PortType (Topology)        : Unidentified
Total Number of Devices    : 0
HBA Status                 : Loop down

Using prtconf

root@ sunserver:/root# prtconf -vp | grep -i wwn
port-wwn:  2100001b.32xxxxxx
node-wwn:  2000001b.32xxxxxx
port-wwn:  2101001b.32yyyyyy
node-wwn:  2001001b.32yyyyyy

Using prtpicl

root@ sunserver:/root# prtpicl -v | grep wwn
:node-wwn  20  00  00  1b  32  xx  xx  xx
:port-wwn  21  00  00  1b  32  xx  xx  xx
:node-wwn  20  01  00  1b  32  yy  yy  yy
:port-wwn  21  01  00  1b  32  yy  yy  yy

Using luxadm

Run the following command to obtain the physical path to the HBA Ports

root@ sunserver:/root$ luxadm -e port
/devices/pci@400/pci@0/pci@9/SUNW,qlc@0/fp@0,0:devctl              CONNECTED
/devices/pci@400/pci@0/pci@9/SUNW,qlc@0,1/fp@0,0:devctl            NOT CONNECTED

With the physical path obtained from the above command, we can trace the WWN numbers as follows. here I use the physical path to the one that is connected:

root@ sunserver:/root$ luxadm -e dump_map /devices/pci@400/pci@0/pci@9/SUNW,qlc@0/fp@0,0:devctl
Pos  Port_ID Hard_Addr Port WWN         Node WWN         Type
0    123456  0         1111111111111111 2222222222222222 0×0  (Disk device)
1    789123  0         1111111111111111 2222222222222222 0×0  (Disk device)
2    453789  0         2100001b32xxxxxx 2000001b32xxxxxx 0x1f (Unknown Type,Host Bus Adapter)

Hope this helps. If you know of any more way then please feel free to post it to the comments and I shall amend it to the article.

posted @ 2011-11-09 13:48  生命的力量在于不顺从  阅读(2729)  评论(1编辑  收藏  举报