A new LPAR was created and new virtual fibre channel adapters were presented to both VIO servers using DLPAR. Now, it’s time to map the newly created virtual fibre channel adapter to a physical fibre channel adapter.
But which vfchost device to map? What are checks needed to be done?
I’ll step you through the process of mapping NPIV virtual fibre channel adapter to a physical adapter on the VIO server.
Check Your Virtual Adapter (vfchost)
In this example, I have performed a DLPAR of virtual fibre channel adapter with the ID 38 on both the VIO servers. We now need to identify the vfchost device presented to the VIO server in order to be able to map them later. Use the lsdev command with the –slots flag in the VIO restricted shell.
On VIO server 1:
vios1 $ lsdev -slots|grep C38
U911 7.MM D.03 21EA 4-V2 -C38 Virtual I/O Slot vfchost17
On VIO server 2:
vios2 $ lsdev -slots|grep C38
U911 7.MM D.03 21EA 4-V3 -C38 Virtual I/O Slot vfchost17
Now we have identified both the virtual fibre channel adapter on both VIO servers. The virtual fibre channel adapters configured to both the VIO servers is vfchost17.
TIPS: If you configured and DLPAR you virtual adapters in the same sequence for both VIO servers from the very first one, your virtual fibre channel device should be the same on both VIO servers like the above example. Make this a practice as it makes VIO server administration simpler and easier.
Identify the Physical Fibre Channel Adapter
Next we need to identify which physical fibre channel adapter we want to map to. The command to use for this is lsnports.
On VIO server 1:
vios1 $ lsnports
name phys loc fabric tports aports swwpns awwpns
fcs0 U2C4 E.00 1.DB AA23 5-P2 -C2- T1 1 64 59 2048 2007
fcs1 U2C4 E.00 1.DB AA23 5-P2 -C2- T2 1 64 60 2048 2014
fcs2 U2C4 E.00 1.DB AA21 1-P2 -C6- T1 1 64 60 2048 2014
fcs3 U2C4 E.00 1.DB AA21 1-P2 -C6- T2 1 64 61 2048 2021
On VIO server 2:
vios2 $ lsnports
name phys loc fabric tports aports swwpns awwpns
fcs0 U2C4 E.00 1.DB AA23 5-P2 -C6- T1 1 64 59 2048 2007
fcs1 U2C4 E.00 1.DB AA23 5-P2 -C6- T2 1 64 60 2048 2014
fcs2 U2C4 E.00 1.DB AA21 1-P2 -C2- T1 1 64 60 2048 2014
fcs3 U2C4 E.00 1.DB AA21 1-P2 -C2- T2 1 64 61 2048 2021
The above command lists all the fibre channel adapters and their available NPIV capable ports. The first column shows the name of the fibre channel adapter. The second column shows the physical location of the fibre channel adapter. For path redundancy in this environment, all adapters that have physical location containing P2-C2 are cabled to SAN fabric A and all that have physical location of P2-C6 are cabled to SAN fabric B.
Now, another variable that we are interested in is the aports. It shows information on the number of available NPIV capable ports. In the example above, the adapter fcs3 has the most available NPIV ports for both the VIOS server. Therefore, I will use that and map it to my virtual fibre channel adapter device.
Notice that fcs3 on vios1 is has the physical address containing P2-C6. Therefore, fcs3 on vios1 is cabled to SAN fabric B. On the other hand on vios2, fcs3 has the physical address containing P2-C2. Therefore fcs3 on vios2 is cabled to SAN fabric A. You may be required to provide this information along with the NPIV WWNs to the storage administrator to perform zone configuration and SAN LUN mappings.
Mapping the Virtual Fibre Channel Adapter
Now we can map the virtual fibre channel adapter to fcs3. We can use the vfcmap command to accomplish this.
On VIO server1:
vfcmap -vadapter vfchost17 -fcp fcs3
On VIO server2:
vfcmap -vadapter vfchost17 -fcp fcs3
Checking the Mappings
You can now check the mappings by using the lsmap command from the VIO server restricted shell.
On VIO server 1:
vios1 $ lsmap -vadapter vfchost17 -npiv
Name Phys loc ClntID ClntName ClntOS
————- —- —- —- —- —- —- —- —- — —— ————– ——-
vfchost17 U911 7.MM D.03 21EA 4-V2 -C38 38 lpar1 AIX
Stat us:N OT_L OGGE D_I N
FC name :fcs 3 FC loc code :U2C 4E.0 01.D BAA2 35-P 2-C2 -T 1
Ports logged in:0
Flags:a
VFC client name: VFC client DRC:
On VIO server 2:
vios2 $ lsmap -vadapter vfchost17 -npiv
Name Phys loc ClntID ClntName ClntOS
————- —- —- —- —- —- —- —- —- — —— ————– ——-
vfchost17 U911 7.MM D.03 21EA 4-V3 -C38 38 lpar1 AIX
Stat us:N OT_L OGGE D_I N
FC name :fcs 3 FC loc code :U2C 4E.0 01.D BAA2 35-P 2-C6 -T 1
Ports logged in:
Flags:a
VFC client name: VFC client DRC:
Since this is a new LPAR, it is not activated yet. Therefore, the status is NOT_LOGGED_IN. However, the lsmap command output above is a good check to confirm that vfchost17 is mapped to fibre channel adapter fcs3 on both the VIO servers.