This one is taken from the first objective in the VMware Enterprise Admin Exam Blueprint. Specifically from the skills section:
– Perform advanced multi-pathing configuration
— Configure multi-pathing policy
— Configure round-robin behavior using command-line tools
After logging into the host via SSH, and getting to root, this can be done with the â€œesxcfg-mpathâ€ command. Letâ€™s take a look at this command:
[root@ProfessionalVMware root]# esxcfg-mpath
esxcfg-mpath <options> [–lun=<LUN>] [–path=<path>]
-l|–list List all LUNs and their paths.
-p|–policy <type> Set the policy for a specific LUN. Requires
a –lun flag. Type must be one of mru, rr, fixed or custom.
-H|–custom-hba-policy Set the custom HBA policy value. Must be one of
mru, preferred, any, minq.
-T|–custom-target-policy Set the custom target policy value. Must be one of
mru, preferred, any
-C|–custom-max-commands Set the custom policy value for max commands
-B|–custom-max-blocks Set the custom policy value for max blocks
-s|–state <on|off> Set the state for a specific LUN Path. Requires
both –lun and –path flags.
-f|–preferred Set the given path to be preferred for the
given LUN. Requires both –path and –lun flags.
-q|–query Query the information on a specific LUN.
Requires a –lun flag.
-P|–path=vmhbaX:X:X Used to specify a path for setting the
path state or preferred path. Uses the
VMkernel internal path name.
-L|–lun=vmhbaX:X:X Indicate which LUN to operate on. This can be
either the internal VMkernel vmhba name for
this LUN (vmhbaX:X:X) or the vml name as
found in /vmfs/devices/disks.
-v|–verbose Show all information about the LUNs and
paths, otherwise a minimal set of data
is displayed to conserve space.
-b|–bulk Bulk path listing suitable for parsing.
-a|–hbas List HBAs on the system with a unique ID
if one is available.
-h|–help Show this message.
-r|–restore Restore path setting to configured values
on system start. (INTERNAL USE ONLY)
Quite the command, isnâ€™t it? And that is but half the output. The particular switches we are interested in are â€“p or –policy to which weâ€™ll feed the â€œrrâ€ or round robin switch. Weâ€™ll follow that up with the â€“L or –lun to specify which lun weâ€™re operating on. Hereâ€™s an example:
[root@ProfessionalVMware root]# esxcfg-vmhbadevs
[root@ProfessionalVMware root]# esxcfg-mpath –policy=rr –lun=vmhba0:0:0
Setting vmhba0:0:0 policy to rr
In all practical terms, on my lab box that didnâ€™t accomplish much, as there is only one actual path to the disk, however, we can still see the changes in the VI Client:
Note: esxcfg-mpath is not actually listed in the tools section for this objective, but is indeed the way to accomplish this.