HUNGAMA
Enthusiast
Enthusiast

How to find HBA WWN number on ESX server

Jump to solution

Hi Friends

I have 2 Emulex HBAs installed on my ESX host. I am trying to find out the HBA WWN numbers. I have lputil installed on ESX hosts but it doesn't show me the WWN. Under VI if I go to the host configuration tab and select storage adapters it shows me the WWPN. Is there any other way to confirm that?

Thanks and Regards

Shail

0 Kudos
1 Solution

Accepted Solutions
azn2kew
Champion
Champion

SAN devices are identified by a world wide name, a unique 64-bit address. Remember we can use the perl script wwpn.pl to determine quickly what the WWN is for the installed FC hba.

You can also view this directory: /proc/scsi/driver/number

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!! Regards, Stefan Nguyen VMware vExpert 2009 iGeek Systems Inc. VMware vExpert, VCP 3 & 4, VSP, VTSP, CCA, CCEA, CCNA, MCSA, EMCSE, EMCISA

View solution in original post

0 Kudos
9 Replies
Liz
Virtuoso
Virtuoso

Moved to the esx forums.

Liz one of your community forum moderators.

0 Kudos
MitchHP
Enthusiast
Enthusiast

On service console "esxcfg-mpath -a" should display a list of all your HBAs including their WWNs.

0 Kudos
azn2kew
Champion
Champion

SAN devices are identified by a world wide name, a unique 64-bit address. Remember we can use the perl script wwpn.pl to determine quickly what the WWN is for the installed FC hba.

You can also view this directory: /proc/scsi/driver/number

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!! Regards, Stefan Nguyen VMware vExpert 2009 iGeek Systems Inc. VMware vExpert, VCP 3 & 4, VSP, VTSP, CCA, CCEA, CCNA, MCSA, EMCSE, EMCISA
0 Kudos
MitchHP
Enthusiast
Enthusiast

Oh, right. "esxcfg-mpath -a" displays only the portnames... My failure...

0 Kudos
RUG201110141
Enthusiast
Enthusiast

You can find the WWN's pretty easily using the VI client I believe, either connecting to VirtualCenter or directly to an ESX host. Select the ESX host in the VI client > Select the Configuration tab > Select Storage Adapters > and on the right hand side the storage adapters are listed. If you select one it should list the details of the hba in the section on the bottom right of the screen.

0 Kudos
HUNGAMA
Enthusiast
Enthusiast

Thanks mate

I checked the WWPN in /proc/scsi/lpfc folder but I was surprised to see that most of the WWPN were same for all the 6 servers. I have total 12 HBAs in the 6 node cluster. Under /proc/scsi/lpfc folder i have 2 files one for each HBA called 0 and 1. WWPN specified in these files are same for all the servers. Is it possible?

Regards

Shail

0 Kudos
azn2kew
Champion
Champion

I would use the VI Client method to double check make sure the WWN match so storage guy can assign storage for you. Follow Russ' replied that should be easiest.

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!! Regards, Stefan Nguyen VMware vExpert 2009 iGeek Systems Inc. VMware vExpert, VCP 3 & 4, VSP, VTSP, CCA, CCEA, CCNA, MCSA, EMCSE, EMCISA
0 Kudos
igiul
Contributor
Contributor

Hello All.

open a shell to the ESX:

ls -la /proc/scsi/qla2xxx

depending on  the output, each file named by a number , is a hba.

cat <number> | grep -A3 'SCSI Device Information'

scsi-qla1-adapter-node=50014380062d2073:31c100:0;
scsi-qla1-adapter-port=50014380062d2072:31c100:0;

other useful:

cat <number>| grep 'Host Device Name'
Host Device Name vmhba2

0 Kudos
sureshsiwach
Contributor
Contributor

Hi All,

If you want find WWN number of all data store in your infrastructure then please use RVtools. It is best and very quick option.

Or you can use below script from power CLI.

add-pssnapin

vmware.vimautomation.core

connect-viserver

Vcenter server name -User "domain\username" -Password xxxxxxxxxxxxx

#param (

#[Parameter(Mandatory=$true)][string]$Cluster,

#[Parameter(Mandatory=$true)][string]$CSVName

#)

$cluster

= "cluster name"

$csvName

= "c:\boot\test.csv"

#Get cluster and all host HBA information and change format from Binary to hex

$list

= Get-cluster $cluster | Get-VMhost | Get-VMHostHBA -Type FibreChannel | Select VMHost,Device,@{N="WWN";E={"{0:X}"-f$_.PortWorldWideName}} | Sort VMhost,Device

#Go through each row and put : between every 2 digits

foreach

($item in $list){

$item.wwn = (&{for ($i=0;$i-lt$item.wwn.length;$i+=2)

{

$item.wwn.substring($i,2)

}})

-join':'

}

#Output CSV to current directory.

$list

| export-csv -NoTypeInformation $CSVName

Thanks Suresh Siwach If you found this answer useful then mark it as correct and helpful.
0 Kudos