Tuesday, September 27, 2011

NPIV: - N-Port ID Virtualization

Fibre Channel SAN configuration guide page 53.

ANSI T11 standard that describes how a single Fibre Channel HBA port can register with the fabric using several worldwide port names (WWPNs). This allows a fabric-attached Nport to claim multiple fabric addresses. Each address appears as a unique entity on the Fibre Channel fabric.

NPIV enables a single FC HBA port to register several unique WWNs with the fabric, each of which can be assigned to an individual virtual machines.

SAN objects, such as switches, HBA, storage devices, or virtual machines can be assigned World Wide Name (WWN) identifiers. WWNs uniquely identify such objects in the Fibre Channel fabric.

When virtual machines have WWN assignments


  • They use them for all RDM traffic, so the LUNs pointed to by any of the RDMs on the virtualm machine must not be masked against its WWNs.
  • The virtual machine's configuration file (.vmx) is updated to include a WWN pair (consisting of a World Wide Port Name, WWPN, and a World Wide Node Name, WWNN)
  • As the virtual machine is powered on, the VMkernel instantiates a virtual port (VPORT) on the physical HBA which is used to access the LUN. The VPORT is a virtual HBA that appears to the FC fabric as a physical HBA that it has its own unique identifier - a WWN pair that was assigned to the virtual machine. Each VPORT is specific to the virtual machine.
  • VPORT is destroyed on the host and it no longer appears to the FC fabric when the virtual machine is powered off.
  • When avirtual machine is migrated from one ESX/ESXi to another, the VPORT is closed on the first host and opened on the destination host.
  • The number of VPORTs that are instantiated equals the number of physical HBAs present on the host. A VPORT is created on each physical HBA that a physical pathis found on. Each physical pathis used to determine the virtual path that will be used to access the LUN.
  • HBAs that are not NPIV-aware are skipped in the discovery process because VPORTs cannot be instantiated on them.
When virtual machine do not have WWN assignment

  • When virtual machine do not have WWN assignment- no NPIV, they access storage LUNs with the WWNs of their host's physical HBAs.
By using NPIV, SAN administrator can monitor and route storage access on a per virtual machine basis.

Requirements for using NPIV.


  1. NPIV can be used only for virtual machines with RDM disks. Virtual machines with regular virtual disks use the WWNs of the host's physical HBAs.
  2. HBAs on your ESX/ESXi host must support NPIV.
  3. Use HBAs of the same type, eiter all Qlogic or all Emulex. VMware does not support hetrogeneous HBAs on the same host accessing the same LUNs.
  4. If a host uses multiple physical HBAs as paths to the storage, zone all physical paths to the virtual machine. This is required to support multipathing even though only one path at a time will be active.
  5. Make sure that physical HBAs on the host have access to all LUNs that are to be accessed by NPIVenabled virtual machines running on that host.
  6. The switches in the fabric must be NPIV-aware.
  7. When configuring a LUN fro NPIV access at the storage level, make sure that the NPIV LUN number and NPIV target ID match the physical LUN and target ID.
  8. Use the vSphere Client to manipulate virtual machine with WWNs
NPIV Capabilities

  • NPIV supports vMotion. Assigned WWN will be retained. When the destination host does not support NPIV, VMkernel reverts to using a physical HBA to reroute the I/O.
  • If your FC SAN environment supports concurrent I/O on the disks from an active-active array, the concurrent I/O to two different NPIV ports is also supported.

Limitations

  • NPIV technology is an extention to the FC protocol, it requires a FC switch and does not work on direct attached FC disks.
  • WWN assigned to the virtual machine can not be retained when clone or template the virtual machine.
  • NPIV does not support Storage vMotion.
  • Disabling and then re-enabling the NPIV capability on a FC switch while virtual machines are running can cause a FC link to fail and I/O to stop.
Assign WWNs to the virtual machines
You can assign a WWN to a new virtual machine with an RDM disk when you create this virtual machine. You can create from 1 to 16 WWN pairs, which can be mapped to the first 1 to 16 physical HBAs on the host.

Procedure.

  1. Open the New Virtual Machine wizard.
  2. select Custom, and click Next.
  3. Follow all steps required to create a custom virtual machine.
  4. On the Select a Disk page, select Raw Device Mapping and click Next.
  5. From a list of SAN disks or LUNs, select a raw LUN you want your virtual machine to access directly.
  6. Select a datastore for the RDM mapping file. Datastore for RDM mapping file can be different or the same datastore where virtual machine files resides. For vMotion of NPIV enabled virtual machine, RDM file must resides on the same datastore where virtual machine configuration file resides.
  7. Follow the steps required to create a virtual machine with the RDM.
  8. On the Ready to Complete page, select the Edit the virtual machine settings before completion check box and click Continue. The Virtual Machine Properties box opens.
  9. Assign WWNs to the virtual machine.

  • Click the Options tab, and select Fibre Channel NPIV.
  • Select Generate new WWNs.
  • Specify the number of WWNNs and WWPNs. A minimum of 2 WWPNs are needed to support failover with NPIV. Typically only 1 WWNN is created for each virtual machine.
10. Click Finish.
Register newly generated WWN in the fabric so that the virtual machine is able to login to the switch and assign storage LUNs to the WWN.
Modify WWN assignments.
Typically, you do not need to change existing WWN assignments on your virtual machine. In certain circumstances, for example, when manually assigned WWNs are causing conflicts on the SAN, you might need to change or remove WWNs.
Prerequisites.

  • Make sure to power off the virtual machine if you want to edit the existing WWNs.
  • Ensure SAN administrator has provisioned the storage LUN ACL to allow the virtual machine's ESX/ESXi host to access it.
Procedure

  1. Open the Virtual Machine Properties diaglog box by clicking the Edit Settings link for the selected virtual machine.
  2. Click the Options tab and select Fibre Channel NPIV.
  3. Edit the WWN assignment by selecting on of the following options.

  • Temporarily disable NPIV for this virtual machin
  • Leave unchanged
  • Generate new WWNs
  • Remove WWN assignment
4. Click OK to save changes.

No comments: