Installation guide

Chapter 29. N_Port ID Virtualization (NPIV)
252
29.1.2. Verify NPIV is used on the HBA
Output the data from the kernel on the port nodes of the HBA.
Example 29.1. QLogic controller example
# cat /proc/scsi/qla2xxx/7
FC Port Information for Virtual Ports:
Virtual Port index = 1
Virtual Port 1:VP State = <ACTIVE>, Vp Flags = 0x0
scsiqla2port3=500601609020fd54:500601601020fd54:a00000:1000: 1;
scsiqla2port4=500601609020fd54:500601681020fd54:a10000:1000: 1;
Virtual Port 1 SCSI LUN Information:
( 0:10): Total reqs 10, Pending reqs 0, flags 0x0, 2:0:1000,
Example 29.2. Emulex controller example
# cat /proc/scsi/lpfc/3
SLI Rev: 3
NPIV Supported: VPIs max 127 VPIs used 1
RPIs max 512 RPIs used 13
Vports list on this physical port:
Vport DID 0x2f0901, vpi 1, state 0x20
Portname: 48:19:00:0c:29:00:00:0d Nodename: 48:19:00:0c:29:00:00:0b
29.1.2.1. Create and destroy a virtual HBA with NPIV
Issue an NPIV create call. Confirm that the host has started a new virtual HBA and that any storage
zones are usable.
To create virtual HBAs using libvirt, you require a NPIV capable HBA and switch.
Confirm that you have those by manually creating a new HBA by printing the contents of the /
sys/class/fc_host/hostN directory where class is the type of adaptor and fc_host is the host
number.
Note that the WWN used below are for demonstrative purposes only. Use WWN customized for your
SAN environment.
Add a new virtual HBA with the following command where
'1111222233334444:5555666677778888' is WWPN:WWNN and host5 is the physical HBA which
the virtual HBA is a client of.
# echo '1111222233334444:5555666677778888' > /sys/class/fc_host/host5/vport_create
If the creation is successful, a new HBA in the system with the next available host number.
Note
The virtual HBAs can be destroyed with the following command:
# echo '1111222233334444:5555666677778888' > /sys/class/fc_host/host5/vport_delete