Managing Path Policies
For each storage device managed by NMP (not PowerPath), an ESXi host uses a path selection policy. If you have a third-party PSP installed on your host, its policy also appears on the list. The following path policies are supported by default.
The host uses the designated preferred path, if it has been configured. Otherwise, the host selects the first working path discovered at system boot time. If you want the host to use a particular preferred path, specify it through the vSphere Web Client, or by using esxcli storage nmp psp fixed deviceconfig set. See Changing Path Policies.
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 active-passive storage devices.
The host uses an automatic path selection algorithm that rotates through all active paths when connecting to active-passive arrays, or through all available paths when connecting to active-active arrays. Automatic path selection implements load balancing across the physical paths available to your host. Load balancing is the process of spreading I/O requests across the paths. The goal is to optimize throughput performance such as I/O per second, megabytes per second, or response times.
VMW_PSP_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.
The type of array and the path policy determine the behavior of the host.
VMkernel resumes using the preferred path when connectivity is restored.
VMkernel attempts to resume by using the preferred path. This action can cause path thrashing or failure when another SP now owns the LUN.
Multipathing Considerations
The following considerations help you with multipathing:
When the system searches the SATP rules to locate a SATP for a given device, it searches the driver rules first. If there is no match, the vendor/model rules are searched, and finally the transport rules are searched. If no match occurs, NMP selects a default SATP for the device.
If VMW_SATP_ALUA is assigned to a specific storage device, but the device is not ALUA-aware, no claim rule match occurs for this device. The device is claimed by the default SATP based on the device's transport type.
The default PSP for all devices claimed by VMW_SATP_ALUA is VMW_PSP_MRU. The VMW_PSP_MRU selects an active/optimized path as reported by the VMW_SATP_ALUA, or an active/unoptimized path if there is no active/optimized path. This path is used until a better path is available (MRU). For example, if the VMW_PSP_MRU is currently using an active/unoptimized path and an active/optimized path becomes available, the VMW_PSP_MRU will switch the current path to the active/optimized one.
While VMW_PSP_MRU is typically selected for ALUA arrays by default, certain ALUA storage arrays need to use VMW_PSP_FIXED. To check whether your storage array requires VMW_PSP_FIXED, see the VMware Compatibility Guide or contact your storage vendor. When using VMW_PSP_FIXED with ALUA arrays, unless you explicitly specify a preferred path, the ESXi host selects the most optimal working path and designates it as the default preferred path. If the host selected path becomes unavailable, the host selects an alternative available path. However, if you explicitly designate the preferred path, it will remain preferred no matter what its status is.
Changing Path Policies
You can change path policies with ESXCLI or with vicfg-mpath.
Changing Path Policies with ESXCLI
You can change the path policy with ESXCLI. Specify one of the options listed in Connection Options in place of <conn_options>.
To change the path policy with ESXCLI
1
esxcli <conn_options> storage nmp device list
2
esxcli storage core plugin registration list --plugin-class="PSP"
3
esxcli <conn_options> storage nmp device set - -device naa.xxx - -psp VMW_PSP_RR
See Supported Path Policies.
4
(Optional) If you specified the VMW_PSP_FIXED policy, you must make sure the preferred path is set correctly.
a
esxcli <conn_options> storage nmp psp fixed deviceconfig get - -device naa.xxx
b
esxcli <conn_options> storage nmp psp fixed deviceconfig set - -device naa.xxx --path vmhba3:C0:T5:L3
The command sets the preferred path to vmhba3:C0:T5:L3. Run the command with --default to clear the preferred path selection.
Changing Path Policies with vicfg-mpath
You can change the path policy with vicfg-mpath. Specify one of the options listed in Connection Options in place of <conn_options>.
To change the path policy with vicfg-mpath
1
vicfg-mpath <conn_options> --list-plugins
At a minimum, this command returns NMP (Native Multipathing Plugin) and MASK_PATH. If other MPP plugins have been loaded, they are listed as well.
2
esxcli <conn_options> nmp device set - -device naa.xxx - -psp VMW_PSP_RR
See Supported Path Policies.
3
(Optional) If you specified the VMW_PSP_FIXED policy, you must make sure the preferred path is set correctly.
a
esxcli <conn_options> storage nmp psp fixed deviceconfig get -d naa.xxxx
b
esxcli <conn_options> storage nmp psp fixed deviceconfig set --device naa.xxx --path vmhba3:C0:T5:L3
The command sets the preferred path to vmhba3:C0:T5:L3
Setting Policy Details for Devices that Use Round Robin
ESXi hosts can use multipathing for failover. With certain storage devices, ESXi hosts can also use multipathing for load balancing. To achieve better load balancing across paths, administrators can specify that the ESXi host should switch paths under certain circumstances. Different settable options determine when the ESXi host switches paths and what paths are chosen. Only a limited number of storage arrays support round robin.
You can use esxcli nmp roundrobin to retrieve and set round robin path options on a device controlled by the roundrobin PSP. Specify one of the options listed in Connection Options in place of <conn_options>.
No vicfg- command exists for performing the operations. The ESXCLI commands for setting round robin path options have changed. The commands supported in ESX/ESXi 4.x is no longer supported.
To view and manipulate round robin path selection settings with ESXCLI
1
esxcli <conn_options> storage nmp psp roundrobin deviceconfig get --device na.xxx
2
Use --bytes or --iops to specify when the path should change, as in the following examples:
esxcli <conn_options> storage nmp psp roundrobin deviceconfig set - -type "bytes" -B 12345 - -device naa.xxx
Sets the device specified by --device to switch to the next path each time 12345 bytes have been sent along the current path.
esxcli <conn_options> storage nmp psp roundrobin deviceconfig set - -type=iops - -iops 4200 - -device naa.xxx
Sets the device specified by --device to switch after 4200 I/O operations have been performed on a path.
Use useano to specify that the round robin PSP should include paths in the active, unoptimized state in the round robin set (1) or that the PSP should use active, unoptimized paths only if no active optimized paths are available (0). If you do not include this option, the PSP includes only active optimized paths in the round robin path set.