I'm using QLogic 8GB Fibre Channel HBA which has NPIV with CentOS6.5
I created the LUN on the SAN and did the zoning for the virtual WWPN.
In CentOS I do the following to create a virtual HBA:
echo '2101001b32a9da5e:2001001b32a9da5e' > /sys/class/fc_host/host1/vport_create
After I do that a new scsi_host3 device pops up and the LUN turns into a disk /dev/sdc. All fine so far. Problem is this doesn't persist after a reboot. When the CentOS is rebooted the LUN is gone, I have to issue the above echo to vport_create again to get the LUN/disk to show up again.
How do I make the virtual (NPIV) FC HBA persist after reboot? I could put the above echo command in a startup script, but that doesn't sound right. Or perhaps that's the way you're supposed to do things with NPIV. I'm finding very little documentation on NPIV use.
My ultimate goal is to use the virtual FC LUN with libvirt in a storage pool. I've read (from Osier) that storage pools in libvirt starting in 1.0.x can make the vHBA persist after reboot. But CentOS 6.5 uses libvirt 0.10.2 and it doesn't seem that 0.10.2 can persist the vHBA. If it can how so?