Thursday, January 8, 2015

WWN

WWN OR WWID 
A World Wide Name (WWN) or World Wide Identifier (WWID) is a unique identifier that is assigned to a manufacturer by the Institute of Electrical and Electronic Engineers (IEEE) and hard-coded into a Fibre Channel (FC) device
WWNs are important when setting up a storage area network (SAN). Each device has to be registered with the SAN by its WWN before the SAN will recognize it. (In fact, if the SAN has trouble recognizing a device, the WWN registration is usually one of the first things an administrator will check.) The names are usually 128 binary digits (bits) long, but could be 64 bits if the device is older.

A WWN is similar in concept to a network card's media access control (MAC) address in an Internet protocol (IP) network, but is formatted differently

Worldwide Names consist of 16 hexadecimal digits grouped as 8 pairs. These are written with colon characters separating each pair. Some WWN examples are shown below:

50:06:04:81:D6:F3:45:42 (EMC disk subsystem)
10:00:00:00:c9:22:fc:01 (Emulex HBA card)
21:00:00:e0:8b:05:05:04 (Qlogic HBA card) 

If our Linux box is connected to one or more SAN switch via Fibre HBA cards. So it becomes very  important to the Storage Team that they assign the storage to the correct Servers via WWN numbers of Fibre HBA Cards. So To find the WWNnumber of  HBA card in linux use the below command :
# systool -c fc_host -v | grep "port_name"
Sample Output :
port_name   = "0x5001438001347fdc"
port_name   = "0x5001438001347fde"
port_name   = "0x50014380013471f0"
port_name   = "0x50014380013471f2"
systool command is provided by the rpm package “sysfsutils
Alternate Method :
# cat /sys/class/scsi_host/hostN/device/fc_host/hostN/port_name
Where “N” is the number of device for your fiber HBAs.

LUN MASKING
Associating a world wide name (WWN) to a logical unit number (LUN) within a storage array is a way of implementing data security in the SAN. Each HBA in your servers connected to the SAN has a WWN. Within the storage array, you can assign the WWN to a particular LUN so that even if zoning is not implemented in the SAN fabric, only that particular HBA will have access to that specific LUN. This is sometimes referred to as "LUN masking." 

No comments:

Post a Comment