Sharing Knowledge | System Admin Articles

Find WWN and WWPN in Linux

How to find WWN and WWPN in Linux?

First let us check, how many HBAs are available on the sever?

mytestsrv1# ls /sys/class/fc_host/
host0  host1

Or you can try the following method as well,


07:0a.0 Fibre Channel: Emulex Corporation Helios LightPulse Fibre Channel Host Adapter (rev 01)
08:0b.0 Fibre Channel: Emulex Corporation Helios LightPulse Fibre Channel Host Adapter (rev 01)

We have Two HBA here from the above example (host0 and host1).

To get the WWNN (World Wide Node Number) in Linux:

mytestsrv1#  cat /sys/class/fc_host/host0/node_name

mytestsrv1# cat /sys/class/fc_host/host1/node_name

To get the WWPN (World Wide Port Number) in Linux:

mytestsrv1#  cat /sys/class/fc_host/host0/port_name0x10000000c9538d83mytestsrv1#  cat /sys/class/fc_host/host1/port_name0x10000000c9538dac

If you have more HBAs, replace "host0 or host1" with "hostN ". In most cases, System admins need to provide the WWPN to storage admins for the storage allocation.

Labels: Linux

My Profile PhotoAbout the Author

I'm Parthiban, An UNIX System Admin by Profession. I'm Experienced in Linux/Unix System Administration and Scripting. I have done lot of work on the infrastructure Mgmt side in Linux, UNIX and Windows system administration, Hardware, Storage and Data center. I'm blogging since 2008.
Follow Me On Twitter or On Facebook

5 Comments for "Find WWN and WWPN in Linux"

thank you very much ,very useful for storage admin begineers

i send my wwnn to san people then they will give me a lun number so now in linux wer i want update this lun number.. give me answer pls..

Hi Mareddy,

after SAN team provide the LUNS, you need scan the SCSI bus to make them visible on OS side. Follow this link..

Wish you Happy New Year 2014,Thank you very much...cheers...

Thanks a lot for sharing your knowledge. It was very useful and easy to understand. Regards :D

What do you think about this Article? Add your Opinion..!

Back To Top