Solaris Express SAN Configuration and Multipathing Guide

Chapter 6 Configuring Virtual Fibre Channel Ports

This chapter provides the steps used to configure N Port ID Virtualization (NPIV) ports, also known as virtual Fibre Channel ports.

What is NPIV?

NPIV is a Fibre Channel facility that enables one Fibre Channel adapter to have many N Port IDs. Each N Port has a unique identity (port WWN and node WWN) on the SAN and can be used for zoning and LUN masking. Soft zoning, which you can use to group ports together by port WWN, is the preferred method of zoning.

Limitations of NPIV

Here is the list of NPIV limitations when used to virtualize Fibre Channel ports:

Creating NPIV Ports

The fcadm(1M) command is available to configure NPIV for non-virtualized environments. For xVM, see the virsh(1M) command documented in the Virtualization System Administration Guide.

The fcinfo(1M) and fcadm(1M) status commands are available to determine the status of NPIV ports, whether the ports are created from fcadm(1M) or by virtualization specific commands, such as xm(1M). The commands also report the relationship between the physical port and the virtual ports hosted on that port.

Other Fibre Channel commands, such as luxadm(1M) and cfgadm(1M), report NPIV information, although there is no distinction made between virtual and physical ports.

ProcedureTo Create an NPIV Port

Before You Begin

Each virtual port must have a port and 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 it 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(1M) output.

  1. Become superuser.

  2. Create an NPIV port:


    # fcadm create-npiv-port -p Virtual_Port_WWN -n Virtual_Node_WWN PhysicalPort_port_WWN
    

    Without the -p and -n options, a random WWN will be assigned for the virtual port and virtual node, respectively.


Example 6–1 Creating an NPIV Port

The following example creates an NPIV port on a physical HBA port with a WWN of 210000e08b170f1c, a virtual port WWN set to 2000000000000001, and a virtual node WWN set to 2100000000000001.


# fcadm create-npiv-port -p 2000000000000001 -n 2100000000000001 210000e08b170f1c

ProcedureTo Delete an NPIV Port

Before You Begin

You can use the fcinfo hba-port command to display the current WWN values for the NPIV ports.

  1. Become superuser.

  2. Delete an NPIV port:


    # fcadm delete-npiv-port -p Virtual_Port_WWN -n Virtual_Node_WWN PhysicalPort_port_WWN
    

Example 6–2 Deleting an NPIV Port

The following example deletes an NPIV port on a physical HPA port with a WWN of 210000e08b170f1c.


# fcadm delete-npiv-port -p 2000000000000001 -n 2100000000000001 210000e08b170f1c

ProcedureTo Report Status on NPIV Ports

  1. Become superuser.

  2. Report status on the currently configured NPIV ports:


    # fcinfo hba-port
    

    The NPIV Port List shows the lists of currently configured NPIV ports.


Example 6–3 Reporting Status on NPIV Ports

The following example shows that HBA port 210000e08b84f7eb has one virtual port.


# fcinfo hba-port
HBA Port WWN: 210000e08b84f7eb
     Port Mode: Initiator
     Port ID: 10100
     OS Device Name: /dev/cfg/c7
     Manufacturer: QLogic Corp.
     Model: 375-3294-01
     Firmware Version: 04.04.00
     FCode/BIOS Version:  BIOS: 1.4; fcode: 1.11; EFI: 1.0;
     Serial Number: 0402F00-0549112895
     Driver Name: qlc
     Driver Version: 20080430-0.00
     Type: N-port
     State: online
     Supported Speeds: 1Gb 2Gb 4Gb
     Current Speed: 4Gb
     Node WWN: 200000e08b84f7eb
     Max NPIV Ports: 63
     NPIV port list:
       Virtual Port1:
             Node WWN: 1110000000000000
             Port WWN: 1210000000000000