2

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?

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
Zoran
  • 21
  • 1
  • NPIV is not common on servers. It's something you see from AIX and blade passthrough modules (as well as from some storage), but all the Linux servers I've worked with have just used their physical WWN, which logs into the fabric as soon as the HBA is enabled. That said, as long as you're not trying to boot from this, maybe putting that echo into a startup script would suffice? – Basil Jun 22 '15 at 20:59

0 Answers0