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,

#lspci 
....
....

....
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
0x20000000c9538d83

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

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.

Share this

Related Posts

Previous
Next Post »

5 comments

Write comments
Anonymous
February 4, 2012 at 5:38 PM delete

thank you very much ,very useful for storage admin begineers

Reply
avatar
June 22, 2012 at 11:52 PM delete

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..

Reply
avatar
June 25, 2012 at 11:12 PM delete

Hi Mareddy,

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

http://www.lazysystemadmin.com/2010/06/scan-and-configure-new-luns-on-redhat.html

Reply
avatar
Anonymous
January 1, 2014 at 2:20 AM delete

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

Reply
avatar
November 4, 2014 at 9:53 PM delete

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

Reply
avatar

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