Users Guide

Table Of Contents
Broadcom DRVLin-UG128-100
27
Emulex Drivers for Linux User Guide
3.2.2.1 Creating vPorts Using the mkvport.sh Script
You can use the mkvport.sh script to create vPorts. To see the usage information, run the script with no parameters
specified. The mkvport.sh script uses the following syntax:
./mkvport.sh <physical_port's_host_number> <port_name> <node_name>
You must supply the physical port’s host number, WWPN, and WWNN when using the mkvport.sh script. For example, to
create a vPort with a port name of 10000000c94ac63a and a node name of 20010000c94ac63a on the physical port with
scsi_host name host7, type:
./mkvport.sh host7 10000000c94ac63a 20010000c94ac63a
This script fails if the vPort is not created.
NOTE: It is possible for a vPort to be created successfully but to be in a failed state. For example, loop devices and NPIV
are not supported on the same port simultaneously. If you are running a loop topology and you create a vPort, the
vPort’s link state will be offline.
3.2.2.2 Deleting vPorts Using the rmvport.sh Script
NOTE: You must unmap, unmount, and flush I/Os to vPort-connected devices before deleting the vPort.
You can use the rmvport.sh script to delete vPorts. To see the usage information, run the script with no parameters
specified. The rmvport.sh script uses the following syntax:
./rmvport.sh <vPort_host_number>
Or
./rmvport.sh <port_name> <node_name>
To delete the vPort with a port name of 10000000c94ac63a and a node name of 20010000c94ac63a, type the following
command:
./rmvport.sh 10000000c94ac63a 20010000c94ac63a
This script can take up to 30 seconds to finish. The script fails if the vPort is not deleted.
3.2.2.3 Displaying vPorts Using the lsvport.sh Script
You can use the lsvport.sh script to display the vPorts and physical ports that are present on the system. Run the script
with no parameters to display port information.
For example:
./lsvport.sh
lpfc0: host6 10000000c93a5b5e:20000000c93a5b5e LP10000 NPIV Not Supported
lpfc1: host7 10000000c93a5b5d:20000000c93a5b5d LP10000 NPIV Not Supported
lpfc2: host8 10000000c93cc8dd:20000000c93cc8dd LPe12000 NPIV Physical
lpfc3: host9 10000000c93cc8dc:20000000c93cc8dc LPe12000 NPIV Physical
lpfc4: host10 10000000c94ac63a:20010000c94ac63a NPIV Virtual (VPI 1)
In reference to the previous example:
For LPFC0 and LPFC1, NPIV Not Supported indicates that this adapter/firmware combination does not support the
creation of vPorts.
For LPFC2 and LPFC3, NPIV Physical refers to a physical port of this adapter.
For LPFC4, NPIV Virtual refers to a vPort of this adapter.