Configuring Multipathing Policies on ESXi 5

by admin

Details on the path selection policies can be found in the vSphere Storage Guide, but are summarised below:

The three default path selection policies (PSPs) are:

  • MRU (Most Recently Used). With this PSP the host selects the path that it used most recently. If the path becomes available the host selects an alternate path, but does not revert back to the original path once it becomes available again. MRU is the default policy for most active-passive storage devices.
  • Fixed. With this PSP the host selects the preferred path if it has been configured. If not, it selects the first working path discovered when the host boots up. You can change the preferred path manually if you need to. Fixed is the default path selection policy for most active-active storage arrays.
  • Round Robin. With this PSP the host rotates through using all active paths when connecting to active/passive arrays and through all available paths when connecting to active/active arrays. Round Robin can be used with either type of array and is used to implement load balancing across paths for different LUNs.

Perform Command Line Configuration of Multipathing Options

ESXCLI is the command to use for configuring multipathing plugins on the CLI. The storage guide points out a few things to bear in mind when dealing with the plugins. It’s worth noting that if no SATP is assigned to a device, then the default SATP for iSCSI or Fiber Channel devices is VMW_SATP_DEFAULT_AA. The default PSP is VMW_PSP_FIXED.

To list the multipathing claim rules for an ESXi host:

 ~ # esxcli storage core claimrule list
Rule Class   Rule  Class    Type       Plugin     Matches
----------  -----  -------  ---------  ---------  ---------------------------------
MP              0  runtime  transport  NMP        transport=usb
MP              1  runtime  transport  NMP        transport=sata
MP              2  runtime  transport  NMP        transport=ide
MP              3  runtime  transport  NMP        transport=block
MP              4  runtime  transport  NMP        transport=unknown
MP            101  runtime  vendor     MASK_PATH  vendor=DELL model=Universal Xport
MP            101  file     vendor     MASK_PATH  vendor=DELL model=Universal Xport
MP          65535  runtime  vendor     NMP        vendor=* model=*

So, what does the above output mean? There are a few things to note:

  • The NMP claims all the paths with a transport type of usb, sata, ide and block scsi.
  • MASK_PATH can be used to hide devices from a host
  • The last rule means that any devices not picked up by previous rules will by claimed by NMP.
  • The Rule Class column in the output describes the category of the claim rule. These can be MP (multipathing), Filter or VAAI.
  • The Class column shows which rules are defined and which are actually loaded. If it says ‘file’ it means that the rule is defined. If it says ‘runtime’ it means that the rule has loaded and is active.

To display multipathing modules, run the following command:

~ # esxcli storage core plugin list
Plugin name  Plugin class
-----------  ------------
NMP          MP

To display the SATPs for the host:

~ # esxcli storage nmp satp list
Name                 Default PSP    Description
-------------------  -------------  ------------------------------------------
VMW_SATP_MSA         VMW_PSP_MRU    Placeholder (plugin not loaded)
VMW_SATP_ALUA        VMW_PSP_MRU    Placeholder (plugin not loaded)
VMW_SATP_DEFAULT_AP  VMW_PSP_MRU    Placeholder (plugin not loaded)
VMW_SATP_SVC         VMW_PSP_FIXED  Placeholder (plugin not loaded)
VMW_SATP_EQL         VMW_PSP_FIXED  Placeholder (plugin not loaded)
VMW_SATP_INV         VMW_PSP_FIXED  Placeholder (plugin not loaded)
VMW_SATP_EVA         VMW_PSP_FIXED  Placeholder (plugin not loaded)
VMW_SATP_ALUA_CX     VMW_PSP_FIXED  Placeholder (plugin not loaded)
VMW_SATP_SYMM        VMW_PSP_FIXED  Placeholder (plugin not loaded)
VMW_SATP_CX          VMW_PSP_MRU    Placeholder (plugin not loaded)
VMW_SATP_LSI         VMW_PSP_MRU    Placeholder (plugin not loaded)
VMW_SATP_DEFAULT_AA  VMW_PSP_FIXED  Supports non-specific active/active arrays
VMW_SATP_LOCAL       VMW_PSP_FIXED  Supports direct attached devices

You can display information on the storage devices claimed by NMP by running:

~ # esxcli storage nmp device list
t10.F405E46494C4540013C625565687D2A6A75633D293877753
   Device Display Name: OPNFILER iSCSI Disk (t10.F405E46494C4540013C625565687D2A6A75633D293877753)
   Storage Array Type: VMW_SATP_DEFAULT_AA
   Storage Array Type Device Config: SATP VMW_SATP_DEFAULT_AA does not support device configuration.
   Path Selection Policy: VMW_PSP_FIXED
   Path Selection Policy Device Config: {preferred=vmhba33:C0:T0:L0;current=vmhba33:C0:T0:L0}
   Path Selection Policy Device Custom Config:
   Working Paths: vmhba33:C0:T0:L0

Changing a Multipath policy

Multipath settings apply on a per-device basis. To change the multipathing policy for a device, locate the datastore in the vSphere client, select properties, then Manage Paths.

path_selection

Choose the policy you require then click ‘change’.

You can verify the change using esxcli if you wish:

~ # esxcli storage nmp device list
t10.F405E46494C4540013C625565687D2A6A75633D293877753
   Device Display Name: OPNFILER iSCSI Disk (t10.F405E46494C4540013C625565687D2A6A75633D293877753)
   Storage Array Type: VMW_SATP_DEFAULT_AA
   Storage Array Type Device Config: SATP VMW_SATP_DEFAULT_AA does not support device configuration.
   Path Selection Policy: VMW_PSP_MRU
   Path Selection Policy Device Config: Current Path=vmhba33:C1:T0:L0
   Path Selection Policy Device Custom Config:
   Working Paths: vmhba33:C1:T0:L0

You can also change a PSP using ESXCLI:

~ # esxcli storage nmp device set --device t10.F405E46494C4540013C625565687D2A6A75633D293877753 --psp VMW_PSP_FIXED

For reference, the PSPs can be listed by running:

~ # esxcli storage nmp psp list
Name           Description
-------------  ---------------------------------
VMW_PSP_MRU    Most Recently Used Path Selection
VMW_PSP_RR     Round Robin Path Selection
VMW_PSP_FIXED  Fixed Path Selection

To change the default PSP for a SATP you can run the following:

~ # esxcli storage nmp satp set --satp VMW_SATP_DEFAULT_AA --default-psp VMW_PSP_MRU
Default PSP for VMW_SATP_DEFAULT_AA is now VMW_PSP_MRU

To view the paths for a device, you can run the following:

~ # esxcli storage nmp path list --device t10.F405E46494C4540013C625565687D2A6A75633D293877753
iqn.1998-01.com.vmware:esxi1-47be1f31-00023d000002,iqn.2006-01.com.openfiler:tsn.a75226350df7,t,1-t10.F405E46494C4540013C625565687D2A6A75633D293877753
   Runtime Name: vmhba33:C1:T0:L0
   Device: t10.F405E46494C4540013C625565687D2A6A75633D293877753
   Device Display Name: OPNFILER iSCSI Disk (t10.F405E46494C4540013C625565687D2A6A75633D293877753)
   Group State: active
   Array Priority: 0
   Storage Array Type Path Config: SATP VMW_SATP_DEFAULT_AA does not support path configuration.
   Path Selection Policy Path Config: {current: no; preferred: no}

iqn.1998-01.com.vmware:esxi1-47be1f31-00023d000001,iqn.2006-01.com.openfiler:tsn.a75226350df7,t,1-t10.F405E46494C4540013C625565687D2A6A75633D293877753
   Runtime Name: vmhba33:C0:T0:L0
   Device: t10.F405E46494C4540013C625565687D2A6A75633D293877753
   Device Display Name: OPNFILER iSCSI Disk (t10.F405E46494C4540013C625565687D2A6A75633D293877753)
   Group State: active
   Array Priority: 0
   Storage Array Type Path Config: SATP VMW_SATP_DEFAULT_AA does not support path configuration.
   Path Selection Policy Path Config: {current: yes; preferred: yes}

Adjusting the PSP RoundRobin Policy

By default, RoundRobin alternates paths on a 1000 IOP basis. You can adjust this with the following command:

storage nmp psp roundrobin deviceconfig set 

Useful Links and Resources

vSphere Storage Guide

Keep up to date with new posts on Buildvirtual.net - Follow us on Twitter:
Be Sociable, Share!

Leave a Comment

*

Previous post:

Next post: