VMware Cloud Community
HUNGAMA
Enthusiast
Enthusiast
Jump to solution

How to find HBA WWN number on ESX server

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

Reply
0 Kudos
1 Solution

Accepted Solutions
azn2kew
Champion
Champion
Jump to solution

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

Reply
0 Kudos
9 Replies
Liz
Virtuoso
Virtuoso
Jump to solution

Moved to the esx forums.

Liz one of your community forum moderators.

Reply
0 Kudos
MitchHP
Enthusiast
Enthusiast
Jump to solution

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

Reply
0 Kudos
azn2kew
Champion
Champion
Jump to solution

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
Reply
0 Kudos
MitchHP
Enthusiast
Enthusiast
Jump to solution

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

Reply
0 Kudos
RUG201110141
Enthusiast
Enthusiast
Jump to solution

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.

Reply
0 Kudos
HUNGAMA
Enthusiast
Enthusiast
Jump to solution

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

Reply
0 Kudos
azn2kew
Champion
Champion
Jump to solution

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
Reply
0 Kudos
igiul
Contributor
Contributor
Jump to solution

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

Reply
0 Kudos
sureshsiwach
Contributor
Contributor
Jump to solution

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.
Reply
0 Kudos