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.
Important: VMware does not recommend you use VMW_PSP_FIXED for devices that have the VMW_SATP_ALUA storage array type policy assigned to them.
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.
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.