How to Check HBA WWN WWNN WWPN on Linux?

Updated: Jan 28

How to get HBA WWPN on Linux is a common task for a storage engineer. We need the WWPN to configure zone on the switch side.We will look at this question today.

In our SAN environment, we have two HBAs installed on the Linux system. We can get the HBA WWN/WWPN using the following way without installing any package.

How to check HBA WWNN WWPN on Linux?

$ find /sys/class/fc_host/*/ -name 'port_name' << retrieve path to wwpn entry


$ find /sys/class/fc_host/*/ -name 'node_name' << retrieve path to wwnn entry


$ grep -v "zZzZ" -H /sys/class/fc_host/host*/*_name

/sys/class/fc_host/host0/port_name:0x2100001b32923dc9      <<WWPN
/sys/class/fc_host/host0/symbolic_name:QLE2462 FW:v8.07.00 DVR:v10.
/sys/class/fc_host/host5/port_name:0x2101001b32b23dc9     << WWPN
/sys/class/fc_host/host5/symbolic_name:QLE2462 FW:v8.07.00 DVR:v10.

$ find /sys/devices -type d -name 'host*' | egrep -v "host_busy|fc_host|scsi_host" | sort


Related Post:

15 Linux multipath examples for Linux admin


Join our mail group. Get a free Linux account on Cloud.

Never miss a post!

Want a free Linux account?  This account can be used to login to our cloud server and practice Linux commands.


✔ Linux Commands   ✔ Linux Skills    ✔ LinuxPerformance   ✔ Linux Interview

Some articles are from the public internet. If you find your article misused or undesired here and you don't want us to display it, please let us know and we'll remove it immediately.