How to remove vfchost from vios (NPIV)
1. Divisar los clientes VIOS configurados.
$ lsdev -dev vfchost*
name status description
vfchost0 Available Virtual FC Server Adapter
vfchost1 Available Virtual FC Server Adapter
vfchost2 Available Virtual FC Server Adapter
vfchost3 Available Virtual FC Server Adapter
vfchost4 Available Virtual FC Server Adapter
vfchost5 Available Virtual FC Server Adapter
vfchost6 Available Virtual FC Server Adapter
vfchost7 Available Virtual FC Server Adapter
vfchost8 Available Virtual FC Server Adapter
vfchost9 Available Virtual FC Server Adapter
vfchost10 Available Virtual FC Server Adapter
2. Verificar con la HMC que es el correcto
$ lsmap -npiv -vadapter vfchost10
Name Physloc ClntID ClntName ClntOS
------------- ---------------------------------- ------ -------------- -------
vfchost10 U8233.E8B.065864P-V1-C16 13 aix-minodo
Status:NOT_LOGGED_IN
FC name: FC loc code:
Ports logged in:0
Flags:1<NOT_MAPPED,NOT_CONNECTED>
VFC client name: VFC client DRC:
2.1 Comparar con el ID cliente que está puesto en el la HMC:
Loguearse a la HMC con usuario hscroot y luego seleccionar el server. Por último divisar el campo ID de la LPAR.
En modo CLI:
hscroot@hmc1:~> lssyscfg -r lpar -m POWERsystem-SN10B7E32 -F name:lpar_id |grep minodo
aix-minodo:13
3. Quitar el Dispositivo/Cliente VIOS
$ rmdev -dev vfchost10
vfchost10 deleted
Resultado:
$ lsdev -dev vfchost*
name status description
vfchost0 Available Virtual FC Server Adapter
vfchost1 Available Virtual FC Server Adapter
vfchost2 Available Virtual FC Server Adapter
vfchost3 Available Virtual FC Server Adapter
vfchost4 Available Virtual FC Server Adapter
vfchost5 Available Virtual FC Server Adapter
vfchost6 Available Virtual FC Server Adapter
vfchost7 Available Virtual FC Server Adapter
vfchost8 Available Virtual FC Server Adapter
vfchost9 Available Virtual FC Server Adapter
TIPS:
$ man rmdev
rmdev command
Purpose
Removes a device from the system.
Syntax
rmdev { -dev | -pdev } Name [ -recursive ] [ [ -ucfg ]
Description
The rmdev command unconfigures and undefines the device specified with the device logical name. If you specify the -recursive flag, the rmdev command
acts on any children of the device as well. By specifying the -ucfg flag the device will be unconfigured but not undefined.
Use the -pdev flag along with the parent device's logical name to delete all of the children devices. The children are deleted in the same recursive
fashion as described above for the -recursive flag. The only difference is that the specified device itself is not deleted. Thus, the -recursive flag
is redundant and need not be specified with the -pdev flag. Attention: To protect the Configuration database, the rmdev command cannot be
interrupted. Stopping this command before execution is complete could result in a corrupted database.
Note: The device specified or the children of the device specified cannot be a physical or logical volume that is assigned to a shared memory pool
(to be used as a paging space device by a shared memory partition).
Flags
-dev Name
Specifies the logical device, indicated by the Name parameter. This flag may not be used with the -pdev flag.
-pdev Name
Specifies the parent logical device (indicated by the Name parameter whose children need to be removed. This flag may not be used with the -dev
flag.
-recursive
Unconfigures the device and its children.
-ucfg
Unconfigures, but does not undefine, the specified device. The device's state will be moved from Available to Defined. To move the device back
to Available state run cfgdev -dev Name
Exit Status
See Exit status for Virtual I/O Server commands.
Examples
1 To unconfigure the cd0 CD-ROM device, type:
rmdev -dev cd0
2 To unconfigure the SCSI adapter scsi1 and all of its children, type:
rmdev -recursive -dev scsi1
3 To unconfigure just the children of the SCSI adapter scsi1, but not the adapter itself, type:
rmdev -pdev scsi1
4 To unconfigure the children of PCI bus pci1 and all other devices under them, type:
rmdev -pdev pci1
(EOF):