IBM Support

How to Initiate a Login/Logout Operation for Virtual Fibre Channel Client Adapters in HMC

Question & Answer


Question

This document describes how to perform a manual N_Port login and logout operation for virtual Fibre Channel (VFC) Client Adapters in an AIX client managed by an HMC.

Cause

A Log In operation can be initiated to facilitate SAN zoning.
This applies to VIOS 3.1

Answer


Things to Keep in Mind
  1. When performing a login operation for a Virtual Fibre Channel (VFC) Client Device Name all inactive WWPNs will be activated, including the second WWPN in the pair assigned to each VFC client adapter.  When performing a logout operation, all WWPNs not in use will be deactivated.
  2. To successfully login a VFC Client Device Name, the corresponding VFC Server adapter must exist, and it must be mapped.
  3. The primary intent of the login operation is to allow the SAN Administrator to allocate, log in and zone the virtual WWPN before the client partition is activated.  This is typically the case for a new partition whose OS will be installed to NPIV SAN storage.  With best practices, the WWPNs should be logged out after they are zoned on the Storage Area Network (SAN) and before the partition is activated. If a partition is activated with WWPNs still logged in, the WWPNs used for client access are automatically logged out so they can be logged in by the client.
  4. The login operation can also be used to zone the inactive WWPNs in preparation for a partition mobility operation. If the login operation is performed when a partition is already active, only the inactive WWPNs are activated to the constant login state similar to physical Fibre Channel adapters. The WWPNs that are already in use by the virtual Fibre Channel client adapters remain in control of the virtual Fibre Channel clients and are not under the control of this command. This means that active client virtual Fibre Channel WWPNs do not achieve a "constant login" state similar to physical Fibre Channel adapters.
  5. The login operation can interfere with partition mobility operations. Best practice is to perform a logout operation for a partition before attempting to migrate the partition to another server. If a mobility operation is attempted with WWPNs still logged in, the firmware will attempt to automatically log out the WWPNs. However, in some cases, the logouts may not complete in time and may therefore cause the mobility operation to fail.
Environment used in the following scenario:
  • - HMC v7r7.9.0
    - VIOS 2.2.4.10 with 8Gb PCI Express Dual Port FC Adapters
    - AIX 7100-02-02-1316 with NPIV V7000 Storage
    - IBM SAN Switch 2498-F48 fOS v7.1.0c
    • Client's sample output


      Where the C# corresponds to the Client Fibre Channel Adapter ID

      Run fcstat command to determine the Active WWPN, i.e.


      Notice the storage is only provisioned thru fscsi0 and fscsi1:
    • In this example, NPIV traffic for the client's virtual FCA, fcs0 (Active WWPN C0507605E7460046) is bridged by 8-GB NPIV port, fcs0, on VIOS1, which is cabled to port 36 on switch 1.
      Below is a sample output from the switch where we can see the active WWPN logged in:
How to Perform Log In and Log Off operation using the HMC Enhanced GUI
> Click Resources
> All Systems
> Click on the System Name (This will display a listing of all the client partitions on the selected system.)
> Click on the client partition name (This will display the client partition's General Properties.)
> Click Virtual Storage under Virtual I/O
> Click Virtual Fibre Channel tab 
  • Look at the WWPN (Status - Logged in By) column for the current WWPN status (LoggedIn-Client, LoggedIn-VirtualIOServer, or LoggedOut-Unknown) of the VFC client adapters for the selected client partition
> Select the desired VFC Client Device Name
> Click Log In or Log Off button, depending on the desired task.
Note: By design, the HMC generates a pair of WWPNs to each VFC client adapter at creation time. The first WWPN in the pair is considered the "Active" WWPN which is the one used to zone the storage for disk visibility by the client partition. The second WWPN in the pair, is referred to as the Inactive WWPN, which is only used for Partition Mobility.
The Log In button will cause all Inactive WWPNs for the selected client partition to be activated:
- WWPN (Status - Logged in By) = LoggedIn-VirtualIOServer
- At this point, the WWPN should be visible on the SAN switch for zoning in preparation for Partition Mobility
In this example, WWPNs ...0046, ...0048, and ...004e are the Active WWPNs whose WWPN (Status - Logged in By) is LoggedIn-Client. Consequently, they remain in control of the VFC client and are not under the control of this Log In/Log Off operation. This means these Active WWPNs do not achieve a constant login state similar to physical Fibre Channel adapters.
> Click Log Off button once the SAN switch zoning has been completed. This will cause all WWPNs not in use (the Inactive WWPN) to be deactivated.
 
  • At this point, all the WWPNs that were previously inactive (...0047, ...0049, and ...004f) are now logged in on the SAN switch ready for the SAN Administrator to create new zone(s), and they will remain in "constant login" state until a Logout operation is performed. Note: By clicking Cancel after a Login operation has been done will just cause the Login Logout Fibre Channel window to be closed, but the inactive or secondary WWPNs will remain Logged-In until the Logout operation is done. It is strongly recommended to perform a Log Off operation once the zoning has been created. Failure to do so may cause vfcmap command to fail on the VIOS with "device is busy" error if one attempts to un-map the NPIV port from the vfchost adapter while the WWPN (Status - Logged in By) status is LoggedIn-VirtualIOServer

  • If we take a closer look at VFC client adapter ID 5's Inactive WWPN (C0507605e7460047) from the switch side, we can see that it is now listed in addition to the Active WWPN (C0507605e7460046):

You can use HMC  command line to display or change the virtual WWPN status.
Login to the HMC as hscroot user and identify the system name where the NPIV client is configured.
To list all system names
hscroot@<hmc_hostname>:~> lssyscfg -r sys -F name
To display the current virtual WWPN status
hscroot@<hmc_hostname>:~> lsnportlogin -m <System_Name> --filter "lpar_names=<NPIV_client_partition_name>"

To Perform a Log In Operation
hscroot@<hmc_hostname>:~> chnportlogin -m <System_Name> -o login --id <NPIV_client_partition_ID>
To Perform a Log Off Operation
hscroot@<hmc_hostname>:~> chnportlogin -m <System_Name> -o logout --id <NPIV_client_partition_ID>

Related Information

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSPHKW","label":"PowerVM Virtual I\/O Server"},"ARM Category":[{"code":"a8m50000000L1zCAAS","label":"PowerVM VIOS-\u003ENPIV {NPIV}-\u003EAIX VFC"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"3.1.2;3.1.3"}]

Document Information

Modified date:
13 February 2023

UID

isg3T1024487