Abstract: Here are some general remarks on how to manage virtual fibre channel adapters on HMC-managed systems with VIOS2.1. Especially when dynamically adding new virtual fibre channel adapters to a client partition care needs to be taken to maintain the partition's profile with its associated WWPNs. Wrong LPAR profile management easily might lead to loss of virtual WWPNs and thus loss of access to SAN devices.
When adding a new virtual fibre channel adapter to a client partition the common approach as used in the past with virtual SCSI adapters, first adding the new client adapter to the LPAR as DLPAR operation and afterwards simply adding the same adapter to the LPAR's current profile does not work for virtual fibre channel adapters!
The reason is, that just in the moment when the virtual fibre channel adapter is created for a client LPAR a pair of unique WWPNs (NPIV) is assigned to this adapter by the system. So when adding a virtual fibre channel adapter dynamically to a client partition a set of WWPNs will be created instantly for this adapter and when attempting to add the same adapter later on to the partition's profile, another pair of WWPNs will be associated with that virtual fibre channel adapter. This behavior can very easily be verified taking a look at the virtual fibre channel adapter properties. The one in the running LPAR will have a different pair of WWPNs than the one in the stored profile. As long as the client LPAR is not shut down everything seems to be fine. But when the LPAR is shut down for the first time and restarted (here actually the saved profile is activated for the first time after the change) then it will come up with another pair of WWPNs and loose access to all SAN devices that have been mapped and zoned to the previous WWPNs of the dynamically added virtual fibre channel adapter. As there is no regular way of reusing WWPNs on the HMC (although there is a workaround to manually change the WWPNs in a profile using the chsyscfg -r prof command), the previous WWPNs are lost and the SAN zoning and subsystem mapping has to be done all over again with the new WWPNs of that virtual fibre channel adapter.

So when adding virtual fibre channel client adapters dynamically to a client partition using a DLPAR operation simply follow the steps below to preserve the WWPN configuration and safely add this new adapter with its associated WWPNs to the client partition's profile (after having configured the associated virtual fibre channel server adapters in the Virtual I/O server partition):
  1. Add the Virtual Fibre Channel client adapter dynamically to the client LPAR.
  2. Use 'Save Current Configuration' to save the current configuration to a new LPAR profile with a new name.
  3. Use 'Change Default Profile' to make the new profile the default profile of the LPAR (if desired), to ensure that this profile with the new virtual fibre channel adapter is automatically used after the next shutdown / restart cycle of the LPAR.


Example:

Adding a virtual fibre channel adapter dynamically to a client LPAR:
Techdocs | Technote: PowerVM - Dynamically adding a Virtual Fibre Channel adapter to a client partition


Techdocs | Technote: PowerVM - Dynamically adding a Virtual Fibre Channel adapter to a client partition

Techdocs | Technote: PowerVM - Dynamically adding a Virtual Fibre Channel adapter to a client partition


Finish the DLPAR operation by pressing <OK> and then open the 'Properties' window of the virtual fibre channel adapter in the current LPAR configuration again.

Techdocs | Technote: PowerVM - Dynamically adding a Virtual Fibre Channel adapter to a client partition

Note: The WWPN fields are only populated after the dynamic LPAR (DLPAR) operation has been committed.

Now use 'Save Current Configuration' to save the client LPAR's current configuration with the dynamically added virtual Fibre Channel client adapter and its associated WWPNs to a new profile:

Techdocs | Technote: PowerVM - Dynamically adding a Virtual Fibre Channel adapter to a client partition

If desired, also don't forget to make the new profile the default profile:

Techdocs | Technote: PowerVM - Dynamically adding a Virtual Fibre Channel adapter to a client partition

Please note, that only the virtual fibre channel client adapter is associated with a pair of NPIV WWPNs, which can be seen in the 'Properties' window of the adapter on the HMC. Thus the management of client LPAR profiles containing virtual fibre channel client adapters requires special handling to preserve the WWPN configuration.

The virtual fibre channel server adapter on the VIOS is not associated with WWPNs and therefore does not require a special handling of VIO server profiles.

A look in the client partition with the dynamically added virtual fibre channel adapter::

# lsslot -c slot
# Slot Description Device(s)
HEA 1 Logical I/O Slot lhea0 ent0
U9117.MMA.06C6DE1-V17-C0 Virtual I/O Slot vsa0
U9117.MMA.06C6DE1-V17-C2 Virtual I/O Slot ent1
U9117.MMA.06C6DE1-V17-C20 Virtual I/O Slot vscsi0
U9117.MMA.06C6DE1-V17-C22 Virtual I/O Slot vscsi1
U9117.MMA.06C6DE1-V17-C30 Virtual I/O Slot Unknown <- right after the completed DLPAR operation, adding a virtual fibre channel client adapter

# cfgmgr

# lsslot -c slot
# Slot Description Device(s)
HEA 1 Logical I/O Slot lhea0 ent0
U9117.MMA.06C6DE1-V17-C0 Virtual I/O Slot vsa0
U9117.MMA.06C6DE1-V17-C2 Virtual I/O Slot ent1
U9117.MMA.06C6DE1-V17-C20 Virtual I/O Slot vscsi0
U9117.MMA.06C6DE1-V17-C22 Virtual I/O Slot vscsi1
U9117.MMA.06C6DE1-V17-C30 Virtual I/O Slot fcs0 <- new virtual fibre channel adapter

# lsdev -Cc adapter
ent0 Available Logical Host Ethernet Port (lp-hea)
ent1 Available Virtual I/O Ethernet Adapter (l-lan)
fcs0 Available 30-T1 Virtual Fibre Channel Client Adapter <- new virtual fibre channel adapter
lhea0 Available Logical Host Ethernet Adapter (l-hea)
vsa0 Available LPAR Virtual Serial Adapter
vscsi0 Available Virtual SCSI Client Adapter
vscsi1 Available Virtual SCSI Client Adapter

# lscfg -vl fcs0
fcs0 U9117.MMA.06C6DE1-V17-C30-T1 Virtual Fibre Channel Client Adapter

Network Address.............C050760035A8008C <- virtual fibre channel adapter WWPN (using NPIV)
ROS Level and ID............
Device Specific.(Z0)........
Device Specific.(Z1)........
Device Specific.(Z2)........
Device Specific.(Z3)........
Device Specific.(Z4)........
Device Specific.(Z5)........
Device Specific.(Z6)........
Device Specific.(Z7)........
Device Specific.(Z8)........C050760035A8008C
Device Specific.(Z9)........
Hardware Location Code......U9117.MMA.06C6DE1-V17-C30-T1

Techdocs | Technote: PowerVM - Dynamically adding a Virtual Fibre Channel adapter to a client partition

SAN Switch - Name Server
Techdocs | Technote: PowerVM - Dynamically adding a Virtual Fibre Channel adapter to a client partition

Note: Only one WWPN is active on a system at a time. The second WWPN is only used in conjunction with Live Partition Mobility. When moving the partition to another system the second WWPN will be used. So be sure to include both WWPNs in the SAN zoning and subsystem LUN mapping when using Live Partition Mobility!

# lsattr -El fcs0
intr_priority 3 N/A False
lg_term_dma 0x800000 N/A True
max_xfer_size 0x100000 N/A True
num_cmd_elems 200 N/A True
sw_fc_class 2 N/A True

# lsattr -El fscsi0
attach switch How this adapter is CONNECTED False
dyntrk yes Dynamic Tracking of FC Devices True <- ## Note, dyntrk=yes and fast_fail are default attributes for
fc_err_recov fast_fail FC Fabric Event Error RECOVERY Policy True <- ## the virtual fibre channel adapter child fscsi device!
scsi_id 0x131a01 Adapter SCSI ID False
sw_fc_class 3 FC Class for Fabric True


For more information on PowerVM with virtual fibre channel (NPIV), please refer to: