To be able to see the WWN on the SAN, after the mapping of vfc on the VIOS, you must start you client partition
Ever been confronted with wanting to setup a new AIX partition that is to boot from NPIV and the SAN guy asks you to activate the port. You may have done it with a physical HBA before, and all that was needed was to start the partition in SMS mode and the SAN “person” could go to work. With NPIV it is different - unfortunately.
First, do not forget to use
vfcmap -vadapter vfchostX -fcp fcsX
to connect the virtual HBA (aka NPIV) to the SAN fabrics. Then, create a seperate profile (I prefer a separate one, it is optional actually) and boot the partition to the openfirmware prompt.
When you see 0> enter ioinfo and in the next menu select fcinfo. From there you can select your virtual adapters and that activates them into the fabric. Call the SAN person an tell him the first, second, etc adapter is ready and to call when he needs the next one.
Remember, if your partition is already bootable once the partition is up (and/or DRA - Dynamic Resource Allocation (was DLPAR)) and cfgmgr has been run the virtual interface is visible in the SAN fabric.
The mobile partition’s virtual Fibre Channel WWPNs must be zoned on the switch with the storage subsystem. You must include both WWPNs from each virtual Fibre Channel adapter in the zone. The WWPN on the physical adapter on the source and destination Virtual I/O Server does not have to be included in the zone.
sg247460 - IBM PowerVM Live Partition Mobility.pdf page 190
Mapping virtual Fibre Channel adapters on VIOS 17.Log on to the VIOS partition. 18.To list the physical Fibre Channel adapters on the VIOS, enter the lsnports command. In Example 3-24, fcs0 is the first adapter port zoned for allocation of disks for virtual SCSI and fcs1 is the second adapter port zoned for NPIV. This is planned in section 3.1, “Single VIOS setup using HMC” on page 20. Example 3-24 List of physical Fibre Channel adapter ports on VIOS $ lsnports name physloc fabric tports aports swwpns awwpns fcs0 U5802.001.0087356-P1-C2-T1 1 64 64 2048 2046 fcs1 U5802.001.0087356-P1-C2-T2 1 64 64 2048 2048
19.To configure the virtual Fibre Channel adapter added via DLPAR in step 4 on page 42, enter the cfgdev command. 20.To list the virtual Fibre Channel adapters, enter:
lsdev -vpd | grep vfchost
In Example 3-25 on page 45, one virtual Fibre Channel adapter is listed with an adapter slot ID of 102 ( C102) created in step 4 on page 42 called vfchost0.
Example 3-25 List of virtual Fibre Channel adapters on the VIOS
$ lsdev -vpd | grep vfchost vfchost0 U8233.E8B.061AB2P-V1-C102 Virtual FC Server Adapter
To map the client virtual Fibre Channel adapter to the physical Fibre Channel adapter zoned for NPIV, enter:
vfcmap -vadapter vfchost0 -fcp fcs1
To verify the virtual Fibre Channel mapping for vfchost0, enter:
lsmap -vadapter vfchost0 -npiv
or to list all virtual Fibre Channel mapping on the VIOS, enter:
lsmap -all -npiv
If you have a dual VIOS setup, repeat step 1 on page 42 through step 21 for VIOS2. Ensure the client partition adapter IDs are unique. Note: You can map multiple client virtual Fibre Channel adapters to a physical Fibre Channel adapter port. Up to 64 client virtual Fibre Channel adapters can be active at one time per physical Fibre Channel adapter.
Example 4-16 Listing virtual Fibre Channel mapping on VIOS
$ lsmap -all -npiv Name Physloc ClntID ClntName ClntOS ------------- ---------------------------------- ------ -------------- ------- vfchost0 U8233.E8B.10F5D0P-V2-C102 10 VirtServer1 AIX Status: LOGGED_IN FC name:fcs1 FC loc code:U5802.001.RCH8497-P1-C5-T2 Ports logged in:1 Flags:a<LOGGED_IN,STRIP_MERGE> VFC client name:fcs1 VFC client DRC:U8233.E8B.10F5D0P-V10-C22
New HMC commands: chnportlogin and lsnportlogin - Login in Virtual Fibre Channel adapters for NPIV client LPARs.
There are two new HMC (V7.7.3.0) commands that can force a client Virtual Fibre Channel adapter to log into a SAN. This should make the life of the AIX and SAN administrator easier, as they will no longer need to install AIX in order for the new VFC adapters to log into the SAN. Although there was an unsupported method* for doing this already (see links below). Nor will the SAN admins need to “blind” zone the WWPNs.
There was some indication of this in the latest VIOS FP readme: https://www-304.ibm.com/support/docview.wss?rs=0&uid=isg400000693
· Enabled SAN login from VIOS
And there was this:
IZ95569: ENABLE SAN LOGIN FROM VIOS FOR IMPROVED UABILITY
https://www-304.ibm.com/support/docview.wss?uid=isg1IZ95569
Problem summary
· Customer will be able to instruct the VIOS to login to the SAN
· for a given WWPN on a given virtual adapter to allow the
· customer to see the WWPN in SAN management tools and easing
· the task of configuring new NPIV client
· partitions.
·
Problem conclusion
· add commands to VIOS manager interface to allow the HMC to
· login, logout and query virtual adapters.
And finally this:
http://www-304.ibm.com/webapp/set2/sas/f/hmcl/power7/v7730.Readme.html#enhance7730
The new lsnportlogin and chnportlogin commands on the 7.730 HMC provide the ability to utilize the new function in the VIOS. From the Readme:
Added the chnportlogin and lsnportlogin commands.
1. The chnportlogin command allows you to perform N Port login and logout operations for virtual fibre channel client adapters that are configured in a partition or a partition profile. Use this command to help you in zoning WWPNs on a Storage Area Network (SAN). A login operation activates all inactive WWPNs, including the second WWPN in the pair assigned to each virtual fibre channel client adapter. This feature is particularly useful for Logical Partition Migration. A logout operation deactivates all WWPNs not in use. A successful login of a virtual fibre channel adapter requires that the corresponding virtual fiber channel server adapter must exist and that it must be mapped.
2. The lsnportlogin command also allows you to list WWPN login status information for virtual fibre channel client adapters configured in partitions or partition profiles.
I found a lot of this information on the IBM developerWorks PowerVM forum:
http://www.ibm.com/developerworks/forums/thread.jspa?threadID=388796
Thanks to http://twitter.com/Kristijan for pointing me in the direction of the PowerVM forum.
Here’s an example of using the lsnportlogin command on one of my systems:
hscroot@HMC1:~> lsnportlogin -m 770-1-Rack_D191 --filter "profile_names=normal" lpar_name=nim1,lpar_id=3,profile_name=normal,slot_num=32,wwpn=c050760405f0000c,wwpn_status=0 lpar_name=nim1,lpar_id=3,profile_name=normal,slot_num=32,wwpn=c050760405f0000d,wwpn_status=0 lpar_name=nim1,lpar_id=3,profile_name=normal,slot_num=33,wwpn=c050760405f0000e,wwpn_status=0 lpar_name=nim1,lpar_id=3,profile_name=normal,slot_num=33,wwpn=c050760405f0000f,wwpn_status=0 lpar_name=nim1,lpar_id=3,profile_name=normal,slot_num=30,wwpn=c050760405f00000,wwpn_status=0 lpar_name=nim1,lpar_id=3,profile_name=normal,slot_num=30,wwpn=c050760405f00001,wwpn_status=0 lpar_name=nim1,lpar_id=3,profile_name=normal,slot_num=31,wwpn=c050760405f00002,wwpn_status=0 lpar_name=nim1,lpar_id=3,profile_name=normal,slot_num=31,wwpn=c050760405f00003,wwpn_status=0 lpar_name=aix01adm,lpar_id=4,profile_name=normal,slot_num=32,wwpn=c050760405f00004,wwpn_status=0 lpar_name=aix01adm,lpar_id=4,profile_name=normal,slot_num=32,wwpn=c050760405f00005,wwpn_status=0 lpar_name=aix01adm,lpar_id=4,profile_name=normal,slot_num=33,wwpn=c050760405f00006,wwpn_status=0 lpar_name=aix01adm,lpar_id=4,profile_name=normal,slot_num=33,wwpn=c050760405f00007,wwpn_status=0 lpar_name=aix01adm,lpar_id=4,profile_name=normal,slot_num=30,wwpn=c050760405f00008,wwpn_status=0 lpar_name=aix01adm,lpar_id=4,profile_name=normal,slot_num=30,wwpn=c050760405f00009,wwpn_status=0 lpar_name=aix01adm,lpar_id=4,profile_name=normal,slot_num=31,wwpn=c050760405f0000a,wwpn_status=0 lpar_name=aix01adm,lpar_id=4,profile_name=normal,slot_num=31,wwpn=c050760405f0000b,wwpn_status=0
Descriptions of selected command attributes:
wwpn_status
The WWPN status. Possible values are:
0 - WWPN is not activated
1 - WWPN is activated
2 - WWPN status is unknown
chnportlogin -o {login | logout} -m managed-system {-p partition-name | --id partition-ID} [-n profile-name] [-w wait-time] [-d detail-level] [-v] [--help]
https://www.ibm.com/developerworks/wikis/display/virtualization/vfclogin