AIX Virtualization - N Port ID Virtualization (NPIV)

NPIV is an acronym for N Port ID Virtualization. N_Port ID Virtualization is a Fibre Channel (FC) industry standard technology that provides the capability to take a physical Fibre Channel Host Bus Adapter (HBA) port and assign it multiple unique world wide port names (WWPNs). The world wide port names can then be assigned to multiple initiators such as Operating Systems. Thus, NPIV allows physical N_Port to be logically partitioned into multiple logical ports/FC addresses so that a physical HBA can support multiple initiators, each with a unique N_Port ID.

Since NPIV provides a direct access to Fiber Channel adapters from multiple client partitions, it simplifies SAN management. Various SAN management tools and best practices can be applied. For example, LUN mapping/masking, fabric zoning and fabric based QoS and accounting can be employed. With NPIV, multiple client partitions can share a bunch of adapters, yet have independent access to their own storage devices. This results in the most efficient adapter utilization.

Correcting a Failed SEA confing in PowerVM on the VIO server

You can troubleshoot errors that occur when you configure a Shared Ethernet Adapter, such as those that result in message 0514-040, by using the lsdev, netstat, and entstat commands.

When you configure a Shared Ethernet Adapter the configuration can fail with the following error: Method error (/usr/lib/methods/cfgsea):

0514-040 Error initializing a device into the kernel.

To correct the problem, complete the following steps:

Verify that the physical and virtual adapters that are being used to create the shared Ethernet adapter are available by running the following command:

lsdev -type adapter

Make sure that the interface of neither the physical nor any of the virtual adapters are configured. Run the following command:

netstat -state

Important: None of the interfaces of the adapters must be listed in the output. If any interface name (for example, en0) does is listed in the output, detach it as follows:

chdev -dev interface_name -attr state=detach

You might want to perform this step from a console connection because it is possible that detaching this interface will end your network connection to the Virtual I/O Server.

Verify that the virtual adapters that are used for data are trunk adapters by running the following command:

entstat -all entX | grep Trunk

Note:

The trunk adapter does not apply to the virtual adapter that is used as the control channel in a Shared Ethernet Adapter Failover configuration.

If any of the virtual adapters that are used for data are not trunk adapters, you need to enable them to access external networks from the HMC.

Verify that the physical device and the virtual adapters in the Shared Ethernet Adapter are in agreement on the checksum offload setting:

Determine the checksum offload setting on physical device by running the following command: (where device_name is the name of the physical device. For example, ent0.)

lsdev -dev device_name -attr chksum_offload

If chksum_offload is set to yes, enable checksum offload for all of the virtual adapters in the Shared Ethernet Adapter by running the following command: (where device_name is the name of a virtual adapter in the Shared Ethernet Adapter. For example, ent2.)

chdev -dev device_name -attr chksum_offload=yes

If chksum_offload is set to no, disable checksum offload for all of the virtual adapters in the Shared Ethernet Adapter by running the following command: (where device_name is the name of a virtual adapter in the Shared Ethernet Adapter.)

chdev -dev device_name -attr chksum_offload=no

If there is no output, the physical device does not support checksum offload and therefore does not have the attribute. To resolve the error, disable checksum offload for all of the virtual adapters in the Shared Ethernet Adapter by running the following command: (where device_name is the name of a virtual adapter in the Shared Ethernet Adapter.)

chdev -dev device_name -attr chksum_offload=no

If the real adapter is a Host Ethernet Adapter port, also known as, a Logical Integrated Virtual Ethernet adapter port, make sure that the Virtual I/O Server has been configured as the promiscuous logical partition for the physical port of the logical Integrated Virtual Ethernet adapter from the HMC.

Share Optical Device

If your VIO server has an optical device and you want to share it out to an LPAR, do the following:

Get partition ID of LPAR

prtconf | grep ^"LPAR Info" 2>/dev/null

On VIO server (from padmin login), get the vhost number(s) for that partition ID:

$ lsmap -all | grep vhost | grep 3$

Note that the partition ID in the right hand column of the lsmap command is in hexadecimal format. Also note that the partition ID will show as zero for an LPAR that is not currently activated

Decide which vhost number you are going to use for that LPAR (if it has more than one).

Verify existence of optical device on VIO server.

lsdev -type optical

Create a virtual device on VIO server to that vhost (from padmin login)

mkvdev -vdev cd0 -vadapter vhost0

Confirm that optical device has been allocated to vhost:

lsmap -vadapter vhost0

Execute cfgmgr on LPAR

cfgmgr

Check to be sure the CDROM showed up in your configuration

lsdev -Cc cdrom

If the device did not take on the identity of the already defined cd0 (if applicable), you may want to remove both and run cfgmgr again (that's what I would do), so you only have one cdrom device and it is available:

lsdev -Cc cdrom
rmdev -dl cd0
rmdev -dl cd1
cfgmgr
lsdev -Cc cdrom

You now have a CDROM defined on the LPAR. You can even boot from it via SMS. You might want to undo this when you are all done.

Unshare Optical Device

Do what you just did above, only backwards.

Remove the cdrom from the LPAR

rmdev -dl cd0

Remove the virtual mapping on VIO server (as padmin)

rmdev -dev vtopt0

Verify it is not mapped

lsmap -vadapter vhost0

Run cfgmgr on LPAR just to be sure devices are good

cfgmgr
lsdev | grep cd

It is gone.