Path Selection Policy with ALUA

Path Selection Policy with ALUA

March 8, 2012 8 By Eric Shanks

It’s important to understand how VMware ESXi servers handle connections to their associated storage arrays.

If we look specifically with fibre channel fabrics, we have several multipathing options to be considered.
There are three path selection policy (PSP) plugins that VMware uses natively to determine the I/O channel that data will travel over to the storage device.

  1. Fixed Path
  2. Most Recently Used (MRU)
  3. Round Robin (RR)
Let’s look at some examples of the three PSPs we’ve mentioned and how they behave.  The definitions come from the vSphere 5 storage guide found below.

 

Fixed Path

The host uses the designated preferred path, if it has been configured.
Otherwise, it selects the first working path discovered at system boot time. If
you want the host to use a particular preferred path, specify it manually. Fixed
is the default policy for most active-active storage devices.
NOTE If the host uses a default preferred path and the path’s status turns to
Dead, a new path is selected as preferred. However, if you explicitly designate
the preferred path, it will remain preferred even when it becomes inaccessible

 

So we’ll show 3 examples.  On the left we’ve shown the default path (manually set) to the storage system.  In the middle picture, we’ve simulated a path failure, and the fixed path has changed.  Then on the right, we’ve shown that when the failure has been resolved, the path goes back to the original path that was set.

 

Fixed Path

 

Most Recently Used

The host selects the path that it used most recently. When the path becomes
unavailable, the host selects an alternative path. The host does not revert back
to the original path when that path becomes available again. There is no
preferred path setting with the MRU policy. MRU is the default policy for most
active-passive storage devices.

 

Below we’ show 3 more examples.  This time we show the MRU policy.  On the left we see the default path that the MRU has chosen.  The middle picture shows a failure and what happens to the path selection.  So far, the MRU Policy looks the same as the Fixed Path Policy.  In the last picture (on the right) you’ll see the difference from Fixed Path.  When the failure has been resolved, the MRU policy does not go back to the original path.

 

MRU

 

Round Robin

The host uses an automatic path selection algorithm rotating through all active
paths when connecting to active-passive arrays, or through all available paths
when connecting to active-active arrays. RR is the default for a number of arrays
and can be used with both active-active and active-passive arrays to implement
load balancing across paths for different LUNs.

 

Below we again have 3 examples.  This time we’re not showing any failures, but we are showing how the round robin policy selects one path, then another, then another and eventually repeats when all the available paths have been used.

 

Round Robin

ALUA

Along with PSPs we also have Storage Array Type Plugins (SATP) which are specific to the storage vendors.  These SATPs are responsible for determining which I/O paths are available to be used.  The SATP is responsible for monitoring changes and handling failovers.  SATPs are used to determine which paths are available and the PSPs then choose the available path to use.  SATPs aren’t used exclusively in failover events though, some storage arrays have two active storage processors but only one of the storage processors owns the LUN that is being accessed.  The specific SATP we’ll be looking at is the Asymmetric Logical Unit Access (ALUA).

 

In the example on the left we can see that the storage path is not optimized.  We found a perfectly acceptable path to the storage system but when we got there we found out that the other storage processor currently owned that LUN.  At that point the storage processor can still access the LUN but has to go through the second storage process and thus is not optimized.  ALUA makes sure that the most optimized path is always used.
AluaExample

 

Now lets look at an example of the Round Robin PSP with the ALUA SATP.
Below we see that there is one storage processor that is the optimized path, but there are still multiple paths to get to that storage processor from the host.  There are two optimized paths available for the Round Robin PSP to go back and forth between to access the LUN.

 

RR with ALUA

If we look in the ESXi Configurations we can see that ALUA is the SATP and Round Robin is the selected PSP.  If you look in the storage paths you’ll see Active(I/O) listed for the optimized storage path and Active as the non-optimized storage path.  Remember that just because it’s not optimized doesn’t mean that the path couldn’t be used if it was necessary.

VMwareALUA

If you want to set your PSP for each path without selecting every path on the host, you can do so with the PowerCLI.

aluapowercli