Finding out whether NPIV is in use
The FCP setup runs in NPIV mode if the port_type attribute of the FCP device attribute contains the string "NPIV". Alternatively, if the applicable permanent_port_name and port_name are not the same and are not NULL.
Procedure
Read the port_type attribute of the FCP device.
For example:
# cat /sys/bus/ccw/drivers/zfcp/0.0.1940/host0/fc_host/host0/port_type
NPIV VPORT
Alternatively, compare the values of the permanent_port_name
attribute and the port_name.
Tip: You can use
lszfcp to list the FCP device
attributes.
Example
# lszfcp -b 0.0.3d0c -a
0.0.3d0c host0
Bus = "ccw"
availability = "good"
...
Class = "fc_host"
...
node_name = "0x5005076400c829e7"
permanent_port_name = "0xc05076ffeb001201"
port_id = "0x67e35d"
port_name = "0xc05076ffeb001b48"
port_state = "Online"
port_type = "NPIV VPORT"
...
symbolic_name = "IBM type serial PCHID: 0120 NPIV UlpId: 02600F18 DEVNO: 0.0.3d0c NAME: hostname.domain"
...
The port_type
attribute directly indicates that NPIV is used. The example also
shows that permanent_port_name
is different from port_name
and
neither is NULL. The example also shows the symbolic_name
attribute that shows the symbolic port name that was registered on the FC name server.