Sunday 11 January 2015

How to find World Wide Name (WWN) for a fibre channel HBA

How to find World Wide Name (WWN) for a fibre channel HBA
You can uses one of the following ways to view WWNs:
  • HBAnyware/OneCommand utility (Emulex HBA only)
  • SANsurfer utility (Qlogic HBA only)
  • SAN switch’s name server output
If none of the above mentioned tools are accessible you can try Fibre Channel Information Tool utility FCINFO.EXE available for download from Microsoft Download web site. It works on Microsoft Windows Server 2003 and Microsoft Windows 2000 systems and comes in a form of MSI package for x86, IA64 or x64 platforms. However, as stated in the Release Notes the Fibre Channel Information Tool does not have to be installed to work correctly. Three core files must be copied in a common folder if the Fibre Channel Information Tool is not installed using the MSI installer: FCINFO.EXE, HBAAPI.DLL, HBATAPI.DLL.
Fibre Channel Information Tool utility is also included in the Microsoft Product Support Reporting Tool and other vendors' reporting tools, such as EMC Grab Utilities (EMCReports), Hewlett Packard Services Reporting Tool (HPS Reports), etc. If you ever run one of those tools on your server, you would have FCINFO.EXE installed.
Running the Fibre Channel Information Tool at a command line with no arguments will give basic information (including WWN) about the installed host bus adapters (HBAs):
C:\>fcinfo

There are 2 adapters:
com.qlogic-QLA2300/2310-0: PortWWN: 21:00:00:e0:8b:08:95:df \\.\Scsi2:
com.emulex-LP9002-1: PortWWN: 10:00:00:00:c9:30:d0:17 \\.\Scsi3:
If you type FCINFO /? or FCINFO /?? you will get a long list of commands, many of which are very task specific and not necessary for information gathering.

On a Linux or UNIX system WWNN and WWPN are recorded in the messages log file when HBA driver is loaded during boot process. To find WWNN/WWPN search messages file for HBA driver name or “wwnn” pattern:
$ cat messages | grep -i "wwnn"
May 17 15:24:19 sunserver1 qlc: [ID 657001 kern.info] Qlogic qlc(0) WWPN=210000e08b122275 : WWNN=200000e08b122275
May 17 15:24:21 sunserver1 qlc: [ID 657001 kern.info] Qlogic qlc(1) WWPN=210100e08b322275 : WWNN=200100e08b322275
May 17 15:24:32 sunserver1 qlc: [ID 657001 kern.info] Qlogic qlc(2) WWPN=210000e08b123372 : WWNN=200000e08b123372
May 17 15:24:33 sunserver1 qlc: [ID 657001 kern.info] Qlogic qlc(3) WWPN=210100e08b323372 : WWNN=200100e08b323372