A World Wide Name (WWN) or World Wide Identifier (WWID) is a unique identifier used in storage technologies including Fibre Channel, Parallel ATA, Serial ATA, SCSI and Serial Attached SCSI (SAS).[1]
A WWN may be employed in a variety of roles, such as a serial number or for addressability; for example, in Fibre Channel networks, a WWN may be used as a WWNN (World Wide Node Name) to identify an endpoint, or a WWPN (World Wide Port Name) to identify an individual port on a switch. Two WWNs which do not refer to the same thing should always be different even if the two are used in different roles, i.e. a role such as WWPN or WWNN does not define a separate WWN space. The use of burned-in addresses and specification compliance by vendors is relied upon to enforce uniqueness.
Each WWN is an 8- or 16-byte number, the length and format of which is determined by the most significant four bits, which are referred to as an NAA (Network Address Authority). The remainder of the value is derived from an IEEE OUI (or from Company Id (CID)) and vendor-supplied information. Each format defines a different way to arrange and/or interpret these components. OUIs are used with the U/L and multicast bits zeroed, or sometimes even omitted (and assumed zero), though CID has U/L set to 1.[2]
The WWN formats include:[3]
WWN addresses are predominantly represented as colon separated hexadecimal octets, MSB-first, with leading zeros — similar to Ethernet's MAC address. However, there is much variance between vendors.[4]
Linux uses WWN to identify disks by providing symbolic links to the real device entry:
ls -l /dev/disk/by-id/ […] lrwxrwxrwx 1 root root 9 Jul 4 22:00 wwn-0x5002e10000000000 -> ../../sr0 lrwxrwxrwx 1 root root 9 Jul 4 22:00 wwn-0x500277a4100c4e21 -> ../../sda lrwxrwxrwx 1 root root 10 Jul 4 22:00 wwn-0x500277a4100c4e21-part1 -> ../../sda1 lrwxrwxrwx 1 root root 10 Jul 4 22:00 wwn-0x500277a4100c4e21-part2 -> ../../sda2 lrwxrwxrwx 1 root root 10 Jul 4 22:00 wwn-0x500277a4100c4e21-part3 -> ../../sda3(There are more entries in this directory which are omitted here)
The target names (sr0, sda) might change when new devices are added to the computer (e.g. sda might become sdb) but the WWN will be the same. That is an advantage when the WWNs are used in configuration files and scripts, e.g., .
There are various ways how to find WWN information.[5]
Regardless of HBA type, below commands can be used to find WWN number information.
# cat /sys/class/fc_host/host*/port_name 0x10000090fa2537d6 0x10000090fa253a29
If EMC Storage is being used so there is a chance you must have SYMCLI software installed. syminq comes with SYSCLI. syminq is also helpful in getting WWN in easy way. [root@server]# syminq hba Host Name : server HBA Type : FibreChannel HBA Name : Emulex-LPe11000-E-2 Vendor : Emulex Corporation Model : LPe11000-E Serial Number : BT01473025 Firmware Version : 2.72A2 (Z3D2.72A2), sli-3 Driver Version : 8.2.0.63.3p; HBAAPI(I) v2.1.g, 12-07-07 Node WWN : 20000000c9b0513a Number of Ports : 1 Port WWN : 10000000c9b0513a Port name : /sys/class/scsi_host/host3 Port type : NPort Port FCID : 2764032 Port speed : 4gbit Supported speed : 4gbit Port state : Online Supported COS : 00000008 Supported FC4 types : 0000010000000001000000000000000000000000000000000000000000000000 Active FC4 types : 0000010000000001000000000000000000000000000000000000000000000000 Max frame size : 2048
It will work if hbanyware package is installed. [root@server]# /usr/sbin/hbanyware/hbacmd listHBAs Manageable HBA List Port WWN : 10:00:00:00:c9:b0:55:2e Node WWN : 20:00:00:00:c9:b0:55:2e Fabric Name: 10:00:50:eb:1a:5f:c7:0c Flags : 8000fe00 Host Name : server Mfg : Emulex Corporation Serial No. : BT01474056 Port Number: n/a Mode : Initiator Port WWN : 10:00:00:00:c9:b0:51:32 Node WWN : 20:00:00:00:c9:b0:51:32 Fabric Name: 10:00:50:eb:1a:5f:bd:0c Flags : 8000fe00 Host Name : server Mfg : Emulex Corporation Serial No. : BT01472998 Port Number: n/a Mode : Initiator [root@server]#
systool utility comes with Linux distros. If it is not available it can be installed on servers where HBA is already installed. # systool -c fc_host -v (output trimmed for clarity) Class Device path = "/sys/class/fc_host/host8" port_name = "10:00:00:00:c9:b0:51:32" node_name = "20:00:00:00:c9:b0:51:32"
OUIs can be queried searching the IEEE organization's Public Manufacturers OUI list. OUIs can also be queried by searching IEEE Standards Registration authority https://regauth.standards.ieee.org/standards-ra-web/pub/view.html#registries.