How do the properties and WWPN/WWNN of a virtual fibre channel adapter on AIX 6.1 with VIOS 2.1 using NPIV look like?

Virtualization is a key factor of IBM's Smarter Planet - Dynamic Infrastructure strategy. On System p the Virtual I/O Server (VIOS) allows sharing of physical resources between LPARs including virtual SCSI, virtual Fibre Channel (NPIV) and virtual networking. N_Port ID Virtualization(NPIV) is a standardized method for virtualizing a fibre channel port. An NPIV-capable fibre channel HBA can have multiple N_Port IDs, each with a unique identity and world wide port name. 
Here I provide an example of how the virtual fibre channel adapter attributes with NPIV and their associated world wide node name (WWNN) and world wide port name (WWPN) look like using the Virtual I/O Server with the 8Gbps Fibre Channel HBA #5735. The examples are given using AIX 6.1 TL4 SP2 as VIOC with VIOS 2.1.2.10 FP22.1 and a B64 SAN switch.

On the B64 SAN switch we see the physical FC port of the 8Gbps FC5735 HBA logged in on switch port 4 with the physical WWPN 10:00:00:00:c9:83:1b:4b and WWNN20:00:00:00:c9:83:1b:4b. On the same switch port but with subsequent port IDs we also find the virtual world wide names of the virtual fibre channel client adapters in the AIX client partition using NPIV. These virtual NPIV world wide names start with c0:--:--:--:--:--:--:--. 

Furthermore we can see that for virtual fibre channel adapters using NPIV the WWNN (World Wide Node Name) is identical to the WWPN (World Wide Port Name) in the SAN.



Taking a look at the virtual fibre channel adapter attributes in the AIX client partition with the lscfg -vl fcsX command we can also see that the 'Network Address' attribute which stands for the WWPN is identical to the 'Device Specific.(Z8)' attribute which stands for the WWNN:


When taking a closer look at the attributes of the virtual fibre channel adapter on the AIX client partition we have:





There are always two WWPNs associated with one virtual fibre channel client adapter on a client partition. Only the first WWPN is initially active and logged in on the switch. The second WWPN is not active until a partition migration (Live Partition Mobility) has been initiated to another managed system. After a successful partition migration the second WWPN will be active on the destination system while the first WWPN will become inactive.

Note, that the WWPN attribute of the virtual fibre channel adapter in the client AIX LPAR as shown by the lscfg -vl fcs3 command does NOT change after a partition migration although the alternate WWPN is now active in the SAN. You can only see that the second WWPN is active on the destination system if you take a look at the attributes of the virtual fibre channel server adapter vfchostX on the VIOS. Once the migration has successfully completed the 'current_wwpn' attribute of the vfchostX device on the destination VIOS partition which initially defaults to '0' will be replaced by the currently used WWPN of the virtual fibre channel client adapter (see example at the end of this document ).


$ lsdev -dev vfchost5 -attr
attribute    value description                            user_settable
current_wwpn 0     WWPN to use - Only set after migration False          -> will be replaced by the active WWPN after first partition migration
map_port     fcs3  Physical FC Port                       False


Hence, for the use of NPIV in conjunction with Live Partition Mobility (LPM) it is necessary to use both WWPNs in your SAN zoning and mapping on the storage subsystems. On Brocade switches, for example, you can easily associate both WWPNs with the same alias name by using 'Add Other' and entering the second WWPN manually. Simply pick and add the first (already active) WWPN of the virtual fibre channel adapter to the alias name, then mark the WWPN with your mouse, use Ctrl-C to copy the WWPN to the clipboard and then use the 'Add Other' button and finally paste the second WWPN into the window by using Ctrl-V and editing the last digits accordingly. Ensure that both WWPNs as shown on the HMC under 'Properties' of the virtual fibre channel client adapter properly match with the WWPNs in the alias definition.

.  

The properties and attributes of the fibre channel client adapter fcsX in the AIX client partition are:





Note, that dynamic tracking and fast_fail are enabled by default for the virtual fibre channel client adapter's child device fscsiX.

Here - as a quick comparison - the default attributes and WWPN/WWNN of a physical fibre channel adapter:







Note, that dynamic tracking and fast_fail are disabled by default for a physical fibre channel adapter's child device fscsiX.


On the Virtual I/O Server we have the physical 8Gbps adapter (#5735) connected to the SAN with its associated physical world wide port and node names (as can be seen above in the snapshot of the SAN switch name server). The physical WWPNs/WWNNs should not be included in the SAN zones and mappings for those SAN devices and LUNs which are exclusively accessed by the client partitions using virtual fibre channel adapters with NPIV. Here, only the client partitions' unique NPIV WWPNs of the virtual fibre channel adapters should be used for those SAN zones and mappings. The NPIV LUNs should not be visible on the VIOS partition at all with virtual fibre channel adapters. The physical WWPNs of the fibre channel adapters should only be used in those zones and mappings where the SAN devices need to be accessed directly by the VIOS partition, for example, when those SAN devices are used as backing devices for Virtual SCSI (VSCSI).



The fabric columns indicates if the SAN fabric is ready for NPIV (1=ready / 0=not ready). Typically the switch firmware must support NPIV and the connected SAN port on the switch needs to be enabled for NPIV which is generally the default setting. The aports column shows the number of available NPIV ports on the physical fibre channel port which can be used for the mapping of additional virtual fibre channel adapters to this physical port. Each physical FC HBA port which is capable of NPIV supports a maximum of 64 virtual NPIV ports as shown in the tports column. The number of available target world wide port names is shown in the awwpns column while the swwpns columns lists the total number of supported target world wide port names.

To map a virtual fibre channel server adapter to a physical fibre channel port the vfcmap command is used:

$ vfcmap -vadapter vfchost5 -fcp fcs3

The mapping between a virtual fibre channel server adapter and a physical fibre channel port can be taken from the lsmap -npiv command:

$ lsmap -vadapter vfchost5 -npiv
Name          Physloc                            ClntID ClntName       ClntOS
------------- ---------------------------------- ------ -------------- -------
vfchost5      U9117.MMA.06C6DE1-V2-C31                3 ATS_GERO#1_IP2 6AIX

Status:LOGGED_IN
FC name:fcs3                    FC loc code:U789D.001.DQD904G-P1-C6-T2
Ports logged in:3
Flags:a<LOGGED_IN,STRIP_MERGE>
VFC client name:fcs3            VFC client DRC:U9117.MMA.06C6DE1-V3-C11-T1


Here we can easily see that the AIX client partition with partition ID 3 and the virtual fibre channel client adapter fcs3 in slot 11 is connected to the virtual fibre channel host adapter vfchost5 in slot 31 on the Virtual I/O Server with partition ID 2 which is mapped to the physical fibre channel port of fcs3 on the VIOS in slotU789D.001.DQD904G-P1-C6-T2.

The attributes of the fibre channel server adapter on VIOS can reveal the active world wide port name (WWPN) of the fibre channel client adapter in the SAN after a successful partition migration.

Initially, the attributes of the fibre channel server adapter vfchostX on VIOS look like:
$ lsdev -dev vfchost5 -attr
attribute    value description                            user_settable
current_wwpn 0     WWPN to use - Only set after migration False      -> default - no partition migration done yet
map_port     fcs3  Physical FC Port                       False


Once a successful partition migration to another managed system has been completed, the second WWPN of the fibre channel client adapter becomes active in the SAN and the current WWPN can be taken from the 'current_wwpn' attribute of the fibre channel server adapter on the VIOS. For example:

$ lsdev -dev vfchost5 -attr
attribute    value            description                            user_settable
current_wwpn 050760035a8013d  WWPN to use - Only set after migration False     -> set after first successful partition migration
map_port     fcs3             Physical FC Port                       False


As mentioned earlier, the WWPN shown by the lscfg -vl fcsX command in the AIX client partition is not updated after a partition migration and still shows the initial WWPN even when the alternate WWPN is active in the SAN on the destination system after migration.
Comments