Sunday, February 19, 2012

VMWare ESXi 5.0 - How To: iSCSI Multipathing and Round Robin w/Jumbo Frame Support

VMWare ESXi 5.0
iSCSI Multipathing and Round Robin
Multiple vSwitches with Jumbo Frame Support



With the release of ESXi 5.0, we can now perform all actions required to get iSCSI multipathing with jumbo frame support via the GUI.  We are going to be building a seperate vSwitch for each iSCSI vmkernel port.  We will also be attaching a single physical uplink to each vSwitch.  This is done to overcome any issues that may arise due to having multiple vmk ports in the same vSwitch that are in the same subnet.  To read more on possible issues, read this article.

Step 1: Building the vSwitch

1. Select Host --> Configuration --> Networking
2. Select 'Add Networking'
3. Select 'VMKernel' then click Next
4. Select the physical NIC you want to use as an uplink for this vSwitch (ex: nic0)
5. Name the Port Group (eg. iSCSI_0) and set the VLAN ID as required.
6. Set the IP Address and Netmask as required for your environment.
7. Click on 'Finish'.

This will build our vSwitch and create a single port group as well as bind it to a physical uplink.  Next we need to modify the vSwitch to enable jumbo frames.


 Step 2: Modifying the vSwitch

1.  Locate your new vSwitch and select 'Properties'.
2. Select 'vSwitch' and then select 'Edit'
3. Under 'Advanced Properties', modify the MTU as required (ex: 9000) and click 'OK'.
4. Select the iSCSI Port Group and select 'Edit'.
5. Under 'NIC Settings', modify the MTU as required (ex: 9000) and click 'OK'.

Repeat the steps above for each vSwitch/iSCSI vmkernel port you need.  In our environment, we have 4 physical gigabit uplinks dedicated to iSCSI, so we have created 4 different vSwitches, each with a single physical uplink and a single iSCSI vmk port group.

Once you have created all the vSwitches you need, its time to bind the vmk ports to the software iSCSI adapter.


Step 3: Modifying the iSCSI Software Adapter


1.  Select Host --> Configuration --> Storage Adapters
2.  Select the 'vmhbaXX' under 'iSCSI Software Adapter' (ex: our adapter is named 'vmhba33')
3.  Select 'Properties' in the Details area.
4.  If the initiator is not already enabled, select 'Configure' and tick the box to enable iSCSI.
5.  Select the 'Network Configuration' tab.
6.  Under 'VMKernel Port Bindings', select 'Add'.
7.  In the pop up window, select the first iSCSI vmk port (ex: iSCSI_0) and click 'OK'.
8.  Repeat steps 6-7 for each iSCSI vmk port you have created.
9.  You should now have multiple iSCSI vmk ports listed, each in a different vSwitch, and each with a different physical uplink.  When all iSCSI vmk ports are added, click 'Close'.

It will ask you to perform a rescan.  Hit yes and allow the system to rescan the vmhba.

If you already have an iSCSI target configured, and you have already set the default satp to VMW_PSP_RR, you should now see multiple active paths to each target.



Wednesday, February 15, 2012

VMWare ESXi 5.0 - iSCSI Multipathing and Round Robin

VMWare ESXi 5.0 - iSCSI
Multipathing and Round Robin Issues After ESXi 5.0 Upgrade


When we originally began with VMWare ESXi 4.0, we followed this great guide on how to do iSCSI multipathing with jumbo frame support. Everything worked great through each ESXi upgrade all the way up to version 5.0.  After the upgrade to ESXi 5.0, we noticed that, according to ESXi, multipathing was working as expected.  Upon further investigation, we noticed that, in reality, the vSwitch was only using 2 physical NICs for iSCSI traffic, not the 4 physical NICs assigned to the vSwitch (and NOT the physical NICs bound to the iSCSI vmk port group).  According to the ARP table on the physical iSCSI switches, we were seeing 3 of the vmkernel MAC addresses on one physical port, and the 4th vmkernel MAC address on another port.  Initially we thought that a clearing of the MAC address table would solve the problem.  This was not the case.

Our next step was to unplug NIC0 and see if we could force the vSwitch to use the other uplinks.  Upon unplugging NIC0, we noticed that traffic began to flow to the other 3 physical NICs.  Plugging NIC0 back in caused the vSwitch to send ALL iSCSI traffic out of NIC0, leaving the other 3 NICs unused.  We tried several different methods to get the iSCSI traffic to spread across all 4 physical NICs as it did so well in ESXI 4.x.  We came up empty across the board. Until we tried the 'Failback' option.

Next, we disabled the "Failback" option in the iSCSI port group configuration for each iSCSI port group in the vSwitch.  This seemed to have worked.  Once we unplugged and the plugged back in NIC0, iSCSI traffic load balanced as before.  Everything worked well, until we rebooted the ESXi host.  Upon rebooting, iSCSI traffic reverted back to only using NIC0 and NIC1.

In the end, we created 4 different vSwitches.   Each vSwitch was configured with a single physical uplink as well as a single iSCSI port group.  The MTU of the vSwitch and the iSCSI port group were both configured at 9000.

According to VMWare Tech Support, this is an 'undocumented best practice' when dealing with multiple port groups with IP addresses in the same subnet, all contained in a single vSwitch.

Our original implementation worked well for around 2 years.  And even after the ESXi 5.0 upgrade, a few of our ESXi hosts still spread the iSCSI traffic across all 4 uplinks as it had before.  However, the majority of our ESXi 5.0 hosts experienced the same issues as described above.  Now ALL ESXi hosts are configured with 4 vSwitches, each with a single physical uplink and a single iSCSI port group.

So, for those that are using iSCSI with multipathing, be sure to verify that the iSCSI traffic is actually flowing out the correct NICs.  It's not enough just to verify that each target is showing 4 active paths, as its the vSwitch that was sending traffic out the wrong uplinks.