Managing Paths
To maintain a constant connection between an ESXi host and its storage, ESXi supports multipathing. With multipathing you can use more than one physical path for transferring data between the ESXi host and the external storage device.
In case of failure of an element in the SAN network, such as an HBA, switch, or cable, the ESXi host can fail over to another physical path. On some devices, multipathing also offers load balancing, which redistributes I/O loads between multiple paths to reduce or eliminate potential bottlenecks.
The storage architecture in vSphere 4.0 and later supports a special VMkernel layer, Pluggable Storage Architecture (PSA). The PSA is an open modular framework that coordinates the simultaneous operation of multiple multipathing plugins (MPPs). You can manage PSA using ESXCLI commands. See Managing Third-Party Storage Arrays. This section assumes you are using only PSA plugins included in vSphere by default.
Multipathing with Local Storage and FC SANs
In a simple multipathing local storage topology, you can use one ESXi host with two HBAs. The ESXi host connects to a dual-port local storage system through two cables. This configuration ensures fault tolerance if one of the connection elements between the ESXi host and the local storage system fails.
To support path switching with FC SAN, the ESXi host typically has two HBAs available from which the storage array can be reached through one or more switches. Alternatively, the setup can include one HBA and two storage processors so that the HBA can use a different path to reach the disk array.
In FC Multipathing, multiple paths connect each host with the storage device. For example, if HBA1 or the link between HBA1 and the switch fails, HBA2 takes over and provides the connection between the server and the switch. The process of one HBA taking over for another is called HBA failover.
FC Multipathing
If SP1 or the link between SP1 and the switch breaks, SP2 takes over and provides the connection between the switch and the storage device. This process is called SP failover. ESXi multipathing supports HBA and SP failover.
After you have set up your hardware to support multipathing, you can use the vSphere Client or vCLI commands to list and manage paths. You can perform the following tasks.
List path information with vicfg-mpath or esxcli storage core path. See Listing Path Information.
Change path state with vicfg-mpath or esxcli storage core path. See Changing the State of a Path.
Important Use ESXCLI for ESXi 5.0. Use vicfg-mpath for ESX/ESXi 4.0 or later. Use vicfg-mpath35 for ESX/ESXi 3.5.
Listing Path Information
You can list path information with ESXCLI or with vicfg-mpath.
Listing Path Information with ESXCLI
You can run esxcli storage core path to display information about Fibre Channel or iSCSI LUNs.
Important Use industry-standard device names, with format eui.xxx or naa.xxx to ensure consistency. Do not use VML LUN names unless device names are not available.
You can display information about paths by running esxcli storage core path. Specify one of the options listed in Connection Options in place of <conn_options>.
esxcli <conn_options> storage core path list
esxcli <conn_options> storage core path list --path <path>
esxcli <conn_options> storage core path list --device <device>
esxcli <conn_options> storage core path stats get
esxcli <conn_options> storage core path stats get --path <path
esxcli <conn_options> storage core path list -d <naa.xxxxxx>
esxcli <conn_options> storage core adapter list
esxcli <conn_options> storage core adapter rescan
Listing Path Information with vicfg-mpath
You can run vicfg-mpath to list information about Fibre Channel or iSCSI LUNs.
Important Use industry-standard device names, with format eui.xxx or naa.xxx to ensure consistency. Do not use VML LUN names unless device names are not available.
You can display information about paths by running vicfg-mpath with one of the following options. Specify one of the options listed in Connection Options in place of <conn_options>.
vicfg-mpath <conn_options> --list-paths
vicfg-mpath <conn_options> --list-compact
vicfg-mpath <conn_options> --list-map
vicfg-mpath <conn_options> --list
-P sas.5001c231c79c4a00-sas.1221000001000000-naa.5000c5000289c61b
vicfg-mpath <conn_options> -l -P vmhba32:C0:T0:L0
The return information includes the runtime name, device, device display name, adapter, adapter identifier, target identifier, plugin, state, transport, and adapter and target transport details.
vicfg-mpath <conn_options> -l -d mpx.vmhba32:C0:T1:L0
vicfg-mpath <conn_options> --list --device naa.60060...
Changing the State of a Path
You can change the state of a path with ESXCLI or with vicfg-mpath.
Changing Path State with ESXCLI
You can temporarily disable paths for maintenance or other reasons, and enable the path when you need it again. You can disable paths with ESXCLI. Specify one of the options listed in Connection Options in place of <conn_options>.
If you are changing a path’s state, the change operation fails if I/O is active when the path setting is changed. Reissue the command. You must issue at least one I/O operation before the change takes effect.
To disable a path with ESXCLI
1
esxcli <conn_options> storage core path list
The display includes information about each path’s state.
2
esxcli <conn_options> storage core path set --state off --path vmhba32:C0:T1:L0
When you are ready, set the path state to active again.
esxcli <conn_options> storage core path set --state active --path vmhba32:C0:T1:L0
Changing Path State with vicfg-mpath
You can disable paths with vicfg-mpath. Specify one of the options listed in Connection Options in place of <conn_options>.
If you are changing a path’s state, the change operation fails if I/O is active when the path setting is changed. Reissue the command. You must issue at least one I/O operation before the change takes effect.
To disable a path with vicfg-mpath
1
vicfg-mpath <conn_options> --list-paths
The display includes information about each path’s state.
2
vicfg-mpath <conn_options> --state off --path vmhba32:C0:T1:L0
When you are ready, set the path state to active again.
vicfg-mpath <conn_options> --state active --path vmhba32:C0:T1:L0