Posted by Cormac Hogan
Technical Marketing Architect (Storage)

Historically, when a path failure occurred, we never had a way of selecting which path to failover to. Rather, the VMW_PSP_MRU path selection policy randomly selected a different active path to the target from all available paths. In ESX 4.1, VMware introduced a feature to allow admins to prioritize/rank different paths, and the one with the highest priority was chosen in the event of a failure on the active path.

 In ESXi 5, this functionality is now merged into the standard VMW_PSP_MRU. An admin can now assign ranks to individual paths. Ranking goes through the pathgroup states in the following order:

  • ACTIVE_UO (Active Unoptomized – ALUA state)

The PSP will then pick a path that has the highest rank for I/O. As long as there are paths in the ACTIVE pathgroup, these will be given preference over paths in the ACTIVE_UO and STANDBY pathgroups, even if the rank of a path in the ACTIVE group is less than that of a path in ACTIVE_UO or STANDBY pathgroup.

When all paths have the same rank, the behaviour is just like normal VMW_PSP_MRU path failover.

Users will be able to get/set path rank using esxcli commands as shown here:

# esxcli nmp psp getconfig –path <vmhba pathname>
# esxcli nmp psp setconfig –config "rank=<number>" –path <vmhba pathname>

# esxcli nmp psp getconfig –device <naa id>
# esxcli nmp psp setconfig –config "rank=<number>" –device <naa id>

The path rank will be persistent across reboots as "esxcli" is used to set path rank. Whenever a path rank is set an entry is made in esx.conf which ensures persistence. A sample esx.conf entry would look like:

/storage/plugin/NMP/device[naa.60060160f1c014002ca7d9e74df2dd11]/psp = "VMW_PSP_MRU_RANKED“
/storage/plugin/NMP/path[fc.2000001b32100b3d:2100001b32100b3d-fc.50060160b0600c6b:5006016030600c6b-naa.60060160f1c014002ca7d9e74df2dd11]/pspConfig = "rank=2"

As long as there are paths in the ACTIVE pathgroup, a path that has the highest rank in ACTIVE pathgroup will be selected. If there are no paths in the ACTIVE pathgroup then the algorithm searches the ACTIVE_UO pathgroup and STANDBY pathgroup in that order. During failover when there are no ACTIVE paths available, ranking will try to activate a path that has the highest rank in ACTIVE_UO state. If no paths are available in ACTIVE_UO state then ranking will pick a STANDBY path that has a highest rank for activation.

Ranking will fail-back to a better ranked path or path with a better state when such a path becomes available. Note that this is safe with respect to path thrashing because VMW_PSP_MRU will never fail-back to a path which requires activation (e.g. ACTIVE to STANDBY or ACTIVE to ACTIVE_UO).

Get notification of these blogs postings and more VMware Storage information by following me on Twitter: Twitter @VMwareStorage