A World Wide Name (WWN) is a unique identifier assigned by the IEEE (Institute of Electrical and Electronics Engineers) for network storage devices.
A WWN is a number that is hard-coded into network storage devices, such as fiber channels (FC) and advanced technology attachments (ATA). In simple terms, a WWN is like a MAC address, but for network storage devices.
A WWN is primarily implemented in SANs with multiple attached storage devices, which helps system administrators (SA) uniquely categorize and identify storage components.
Veritas DMP is capable of exposing WWN related content for discovered controllers.
# vxdmpadm getctlr all
LNAME PNAME VENDOR CTLR-ID
=====================================================================================================
c13 c13 QLogic Corporation 20:00:00:24:ff:1a:77:72
c11 c11 QLogic Corporation 20:00:00:24:ff:1a:77:74
c15 c15 QLogic Corporation 20:00:00:24:ff:1a:77:73
c14 c14 - -
c0 c0 - -
Depending on environmental factors, Veritas may not be able to expose WWN details following a reboot.
Whilst it is essential the OS (Operating System) is able to see the WWN information for Veritas DMP to display it, changes may be required to work with RedHat.
Sample RedHat commands:
List the controller (HBA) ids:
# find /sys/class/fc_host/*/ -name 'node_name'
/sys/class/fc_host/host11/node_name
/sys/class/fc_host/host13/node_name
/sys/class/fc_host/host14/node_name
/sys/class/fc_host/host15/node_name
List the controller WWN details:
# find /sys/class/fc_host/*/ -name 'node_name' |xargs cat
0x20000024ff1a7774
0x20000024ff1a7775
0x20000024ff1a7772
0x20000024ff1a7773
# find /sys/class/fc_host/*/ -name 'port_name' |xargs cat
0x21000024ff1a7774
0x21000024ff1a7775
0x21000024ff1a7772
0x21000024ff1a7773
List the controller port state:
# find /sys/class/fc_host/*/ -name 'port_state' |xargs cat
Online
Online
Online
Online
vxpath_links script
The /lib/udev/vxpath_links script is processed during the boot process and parses the device names to create the /dev/vx/.dmp/devname symlinks pointing to /dev/disk/by-path/physname.
The /etc/vx/vxpath_links script is used to generate WWN & PWWN information whenever devices are discovered in the /dev/vx/.dmp directory.
Whenever vxesd (eventsource) starts, it reads the /dev/vx/.dmp contents and populates the WWN & PWWN information in /etc/vx/ddlconfig.info file.
VxVM tracks the hardware physical path by referencing the "/dev/vx/.dmp/" directory contents, which contains symbolic links between sd names and hardware paths.
DMP reads the /dev/vx/.dmp/devname symlink to get the physical path name for saving the path-specific configuration changes.
Modify
The /etc/vx/vxpath_links and /lib/udev/vxpath_links script needs to include the following section highlighted in BOLD below within the gather_ddlconfig function:
gather_ddlconfig()
{
dev=$1
wwnpath=$2
fcdevice=0
srpdevice=0
DEV=`readlink --canonicalize /sys/block/$dev/device`
tgt_path="${DEV%/*}"
hba_path="${tgt_path%/host[0-9]*}"
ctlr_id=`echo $tgt_path | sed 's/.*host\([0-9]*\).*/\1/'`
# Populate ctlr physical info
if [ ! -f "$DMP_BYPATH_LINK/c$ctlr_id" ]; then
ctlr_physname=`echo $wwnpath | \
sed 's/\(\-[a-z]*\-\).*//' 2>/dev/null`
ln -sf $ctlr_physname $DMP_BYPATH_LINK/c$ctlr_id
fi
is_fc_device=`echo $wwnpath | grep -c "\-fc\-"`
if [ $is_fc_device -ne 0 ]; then
fcdevice=1
elif [ -d $tgt_path/../$SRP_HOST_DIR ]; then
srpdevice=1
else
return;
fi
Veritas builds the WWN and PWWN details as follows:
1. VxVM calls “vxpath_links ALL” to build the paths under /dev/vx/.dmp/HBA
2. vxesd generates /etc/vx/ddlconfig.info by scanning all the /dev/vx/.dmp/
On a server where the PWWN details are reported
# ls -la /dev/vx/.dmp/HBA
total 0
drwxr-x--- 6 root root 120 Feb 23 15:27 .
drwxr-x--- 3 root root 7580 Apr 14 11:05 ..
drwxr-x--- 6 root root 140 Apr 14 10:55 2
drwxr-x--- 6 root root 140 Apr 14 11:00 3
drwxr-x--- 6 root root 140 Apr 14 11:05 4
drwxr-x--- 6 root root 140 Apr 14 11:05 5
On a server where the PWWN details are NOT reported:
# ls -la /dev/vx/.dmp/HBA
total 0
drwxr-x--- 2 root root 40 Apr 9 14:50 .
drwxr-x--- 3 root root 720 Apr 14 10:01 ..
3. The Device Discover Layer (DDL) builds the ddl_entity_list from /etc/vx/ddlconfig.info file, which includes the port id information
4. vxdmpadm gets the PWWN from property list plist by req_ddl_get_port_info through vold, the plist is populated from ddl_entity_list
The Veritas script can be run as follows “#sh -x /etc/vx/vxpath_links ALL” which generates the /dev/vx/.dmp/HBA file contents
Veritas DMP on H/W path of the sd device under /dev/disk/by-path to discover some device attributes, such as PWWN.