7.4.8. Changing an NPIV Mapping

The assignment of a virtual FC server adapter to a physical FC port can be changed dynamically. However, changing the mapping can affect the I/O of the client LPAR. If the mapping is changed to a different physical FC port, the change is without any (almost) uninterruption in the best case. The paths using the virtual FC client adapter are not available for a short time, but they work again immediately after being remapped. Whether this can cause I/O problems in the client LPAR, depends on the operating system, the configuration of the virtual FC client adapter (especially the dyntrk attribute) and the I/O load. To avoid possible problems, one should remove the affected paths in the client LPAR before remapping, similar to the procedure for removing the mapping. This is briefly described below for the case of the AIX LPAR aix22. The virtual FC client adapter fcs0 of aix22 is to be remapped from the physical FC port fcs0 on the virtual I/O server ms03-vio1 to the physical FC port fcs4. The physical FC port fcs4 is in the same fabric, so all LUNs should be available again after remapping.

The first thing to do, is to check whether all LUNs used have alternative paths by another virtual FC adapter:

aix22 # lspath
Enabled hdisk0 fscsi0
Enabled hdisk1   fscsi0
Enabled hdisk2   fscsi0
Enabled hdisk3   fscsi0
Enabled hdisk4   fscsi0
Enabled hdisk5   fscsi0
Enabled hdisk0 fscsi0
Enabled hdisk1   fscsi0
Enabled hdisk2   fscsi0
Enabled hdisk3   fscsi0
Enabled hdisk4   fscsi0
Enabled hdisk5   fscsi0
Enabled hdisk0 fscsi1
Enabled hdisk1   fscsi1
Enabled hdisk3   fscsi1
Enabled hdisk4   fscsi1
Enabled hdisk5   fscsi1
Enabled hdisk0 fscsi1
Enabled hdisk1   fscsi1
Enabled hdisk3   fscsi1
Enabled hdisk4   fscsi1
Enabled hdisk5   fscsi1
aix22 #

This is not the case for the physical volume hdisk2, it only has paths using fcs0:

aix22 # lspath -l hdisk2
Enabled hdisk2 fscsi0
Enabled hdisk2 fscsi0
aix22 #

However, hdisk2 is not in use in our case:

aix22 # lspv|grep hdisk2
hdisk2          cafe000000000002                    None                       
aix22 #

We therefore temporarily remove the physical volume hdisk2 from the operating system:

aix22 # rmdev -l hdisk2
hdisk2 Defined
aix22 #

After remapping, hdisk2 should be accessible again, so we keep the definition of hdisk2 in the ODM.

All other LUNs have additional paths through fcs1 and therefore remain available. In order that the paths through fcs0 can no longer be used, we remove these paths:

aix22 # rmpath -p fscsi0
paths Defined
aix22 #

Now that the virtual FC client adapter fcs0 is no longer in use, the mapping on the virtual I/O server can be changed to the physical port fcs4:

$ vios vfcmap ms03-vio1 vfchost2 fcs4
vfchost2 mapped to fcs4
$

A short check of the NPIV mappings on the virtual I/O server shows, that the virtual FC server adapter has immediately logged into the fabric again and that the storage ports are also visible again:

$ vios lsnpiv ms03-vio1
NAME      SLOT  FC    FCLABEL  CLIENT        CLNTOS  VFCCLIENT  VFCSLOT  STATUS       PORTS
vfchost2  C5    fcs4  Fabric1  aix22(5)   AIX     fcs0       C10      LOGGED_IN      7
vfchost3  C125  fcs0  Fabric1  aixsap01(9)   AIX     fcs0       C10      LOGGED_IN      7
vfchost4  C181  fcs0  Fabric1  aixdbp02(11)  AIX     fcs0       C10      LOGGED_IN      5
vfchost5  C182  fcs0  Fabric1  aixdbi02(13)  AIX     fcs0       C10      LOGGED_IN      5
vfchost6  C38   fcs0  Fabric1  aix22(5)   AIX     fcs2       C11      LOGGED_IN      1
$

Finally, the temporarily removed hdisk2 and removed paths can be reconfigured in the operating system, by running the config manager cfgmgr:

aix22 # cfgmgr
aix22 #

Afterwards, all paths are available again, and the temporarily removed hdisk2 reappears:

aix22 # lspath
Enabled hdisk0 fscsi0
Enabled hdisk1   fscsi0
Enabled hdisk2   fscsi0
Enabled hdisk3   fscsi0
Enabled hdisk4   fscsi0
Enabled hdisk5   fscsi0
Enabled hdisk0 fscsi0
Enabled hdisk1   fscsi0
Enabled hdisk2   fscsi0
Enabled hdisk3   fscsi0
Enabled hdisk4   fscsi0
Enabled hdisk5   fscsi0
Enabled hdisk0 fscsi1
Enabled hdisk1   fscsi1
Enabled hdisk3   fscsi1
Enabled hdisk4   fscsi1
Enabled hdisk5   fscsi1
Enabled hdisk0 fscsi1
Enabled hdisk1   fscsi1
Enabled hdisk3   fscsi1
Enabled hdisk4   fscsi1
Enabled hdisk5   fscsi1
aix22 #