7.4.7. Removing an NPIV Mapping
The assignment of a virtual FC server adapter to a physical FC port can be removed at any time. It should be noted, however, that the devices connected via the corresponding virtual FC client adapter (usually LUNs and/or tapes) on the client LPAR can then no longer be reached immediately. Access to tapes then immediately leads to an I/O error. When accessing connected LUNs, the behavior depends on whether multipathing is used (the AIXPCM Path Control Module is used by default with AIX) and whether paths to the affected LUNs are still available via other virtual FC client adapters.
As a concrete example, the following shows the procedure for removing the mapping for the virtual FC adapter fcs0 of the client LPAR aix22.
It should be checked whether all LUNs used have alternative paths via 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 #
In the example output, all LUNs except hdisk2 have alternative paths via the second virtual FC adapter fcs1. The hdisk2 only has paths through fcs0:
aix22 # lspath -l hdisk2
Enabled hdisk2 fscsi0
Enabled hdisk2 fscsi0
aix22 #
This means, that if the mapping for fcs0 is removed, I/O to hdisk2 is no longer possible! However, the hdisk2 is not in use in our case:
aix22 # lspv|grep hdisk2
hdisk2 cafe000000000002 None
aix22 #
Therefore we are permanently remove hdisk2 from the operating system:
aix22 # rmdev -dl hdisk2
hdisk2 deleted
aix22 #
All other LUNs have additional paths through fcs1 and therefore remain available. We remove the paths through fcs0, in order that they are no longer used:
aix22 # rmpath -dp fscsi0
paths Deleted
aix22 #
The associated virtual I/O server and the vfchost device for the virtual FC client adapter fcs0 can easily be found using the “vios lsnpiv” command:
$ vios lsnpiv ms03-vio1
NAME SLOT FC FCLABEL CLIENT CLNTOS VFCCLIENT VFCSLOT STATUS PORTS
vfchost2 C5 fcs0 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
$
The assignment can now be removed, using the “vios vfcunmap” command (unmap virtual FC adapter):
$ vios vfcunmap ms03-vio1 vfchost2
vfchost2 unmapped
$
Instead of the device name for the vfchost adapter, as with mappings, the slot number or a unique suffix of the physical location code can be specified as well.