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 newsletter. Get a free Linux account on Cloud.

Get a Free Cloud Server! 

We can use this cloud server to practice Linux commands. Never miss a post!

Thanks for submitting!