You can configure NPIV for non-virtualized environments by using the fcadm command.
You can use fcinfo and fcadm status commands to determine the status of NPIV ports, regardless of whether the ports are created by using the fcadm command. These commands also report the relationship between the physical port and the virtual ports hosted on a specific HBA port.
Other FC commands, such as cfgadm, report NPIV information, although no distinction is made between virtual and physical ports.
Before You Begin
Each virtual port must have a port name and a node name. The port name must be unique on the SAN. You can assign names manually or use the built-in random WWN generator. If you attempt to register duplicate names, most switches will report an error status on the newly registered WWN, and the switch will not register the new WWN.
For more information on acceptable name formats, refer to the T11 standard: Fibre Channel Framing and Signaling (FC-FS 2).
If you try to create an NPIV port on an HBA that does not support NPIV, an error will occur. If you try to create an NPIV port on an HBA that supports NPIV but is attached to a switch which does not support NPIV, the port will be created with an offline status. The status will be reported in the fcinfo output.
For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.
# fcadm create-npiv-port -p Virtual_Port_WWN -n Virtual_Node_WWN PhysicalPort_port_WWN
If you omit the –p and –n options, a random WWN will be assigned for the virtual port and virtual node,
The following example shows how to create an NPIV port on a physical HBA port with a WWN of 2100000e1ec95100, a virtual port WWN set to c300000000005100, and a virtual node WWN set to c0007d32aa4c2b59.
# fcadm create-npiv-port -p c300000000005100 -n c0007d32aa4c2b59 2100000e1ec95100
For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.
# fcinfo hba-port
The NPIV port list shows the list of currently configured NPIV ports.
The following example shows that HBA port 2100000e1ec95100 has three virtual ports.
# fcinfo hba-port HBA Port WWN: 2100000e1ec95100 Port Mode: Initiator Port ID: 150300 OS Device Name: /dev/cfg/c6 Manufacturer: QLogic Corp. Model: 7023303 Firmware Version: 8.05.00 FCode/BIOS Version: BIOS: 3.19; fcode: 4.02; EFI: 5.36; Serial Number: 463916R+1606293054 Driver Name: qlc Driver Version: 161214-5.06a Type: N-port State: online Supported Speeds: 4Gb 8Gb 16Gb Current Speed: 8Gb Node WWN: 2000000e1ec95100 Max NPIV Ports: 253 NPIV port list: Virtual Port1: Node WWN: c0007d32aa4c2b59 Port WWN: c300000000005100 Virtual Port2: Node WWN: c0007d1d0e534e62 Port WWN: c200000000005100 Virtual Port3: Node WWN: c0007db21db5c9b7 Port WWN: c100000000005100
Before You Begin
You can use the fcinfo hba-port command to display the current WWN values for the NPIV ports. For more information, see Displaying Fibre Channel Devices.
For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.
# fcadm delete-npiv-port -p Virtual_Port_WWN PhysicalPort_port_WWN
The following example deletes an NPIV port on a physical HBA port with a WWN of 2100000e1ec95100.
# fcadm delete-npiv-port -p c300000000005100 2100000e1ec95100