[Home] [Forum] [3i RCLI Guide]

The commands vicfg-mpath.pl (esxcfg-mpath.pl) are used to manage multipath setting for iSCSI and Fibre Channel LUNs. A few things to note about using the vicfg-mpath.pl command:
1) The names of virtual machine HBAs can change across reboots so it is best to use VML LUN names to be sure of consistency. The VML name for a LUN is globally unique for a LUN and will remain the same after a reboot of the host.
2) If you change the preferred path or change a path's state when I/O is active then the command may fail and need to be reissued.

The following are options for the vicfg-mpath.pl command
--bulk (-b) -- show all paths and LUNs in a script friendly format.
--detailed (-d) -- shows all information about the LUN, its paths and includes the LUN VML name.
--hbas (-a) -- lists all Fibre Chanell and iSCSI HBAs.
--list (-l) -- displays all LUNS and paths.
--query (-q) -- query a specific LUN for its inforamation. This requires the use of the --lun=<lun> (-L=<lun) option.
--state [on | off ] (-s [on | off ] ) -- sets the state of a specified path as either on or off. This requires the use of the --lun=<lun> (-L=<lun) and --path=<path> (-P=<path) options. The path can be specified as either the long path UID or the shorter runtime name.
-- preferred (-f) -- used to set the preferred path for a LUN. This requires the use of the --lun=<lun> (-L=<lun) and --path=<path> (-P=<path) options. This does require that the LUN be set to a policy of fixed.
-- policy=[mru | fixed] (-p=[mru | fixed]) -- this will set the policy for a LUN to either most recently used or fixed. This requires the use of the --lun=<lun> (-L=<lun) option.

Sample Session

vicfg-mpath.pl --server 206.47.128.91 --list --username root

disk vmhba0:0:0 (34678MB) has 1 paths and policy of fixed
Local 2:1.0 vmhba0:0:0 On active preferred

disk vmhba2:0:0 (307200MB) has 2 paths and policy of mru
FC 6:1.1 2305843096692482699<->2377900690730410635 vmhba2:0:0 standby
FC 6:1.1 2305843096692482699<->2377900690730410635 vmhba2:1:0 On active

vicfg-mpath.pl --server 206.47.128.91 --list --detailed --username root

disk vmhba0:0:0 vml.0000000000766d686261303a303a30 (34678MB) has 1 paths and policy of fixed
Local 2:1.0 vmhba0:0:0 On active preferred

disk vmhba2:0:0 vml.0200000000600a0b8000198e5b00001bf844d082bc313732322d36 (3072
00MB) has 2 paths and policy of mru
FC 6:1.1 2305843096692482699<->2377900690730410635 vmhba2:0:0 standby
FC 6:1.1 2305843096692482699<->2377900690730410635 vmhba2:1:0 On active

vicfg-mpath.pl --server 206.47.128.91 --hbas

vmhba1 2305843096692482698 6:1.0
vmhba2 2305843096692482699 6:1.1

vicfg-mpath.pl --server 206.47.128.91 --query --lun=vmhba2:0:0

disk vmhba2:0:0 (307200MB) has 2 paths and policy of mru
FC 6:1.1 2305843096692482699<->2377900690730410635 vmhba2:0:0 standby
FC 6:1.1 2305843096692482699<->2377900690730410635 vmhba2:1:0 On active

vicfg-mpath.pl --server 206.47.128.91 --policy fixed --preferred --lun=vmhba2:0:0 --path=vmhba2:0:0

Setting vmhba2:0:0 -- vmhba2:0:0 as preferred path
Setting vmhba2:0:0 policy to fixed

vicfg-mpath.pl --server 206.47.128.91 --bulk

vmhba0:0:0 vml.0000000000766d686261303a303a30 /vmfs/devices/disks/vmhba0:0:0:0 vmhba0:0:0 Local 2:1.0

vmhba2:0:0 vml.0200000000600a0b8000198e5b00001bf844d082bc313732322d36 /vmfs/devices/disks/vml.0200000000600a0b8000198e5b00001bf844d082bc313732322d36 vmhba2:0:0
FC 6:1.1 2305843096692482699<->2377900690730410635
vmhba2:0:0 vml.0200000000600a0b8000198e5b00001bf844d082bc313732322d36 /vmfs/devices/disks/vml.0200000000600a0b8000198e5b00001bf844d082bc313732322d36 vmhba2:1:0
FC 6:1.1 2305843096692482699<->2377900690730410635

vicfg-mpath.pl --server 206.47.128.91 --query --lun=vml.0200000000600a0b8000198e5b00001bf844d082bc313732322d36

disk vmhba2:0:0 (307200MB) has 2 paths and policy of fixed
FC 6:1.1 2305843096692482699<->2377900690730410635 vmhba2:0:0 standby preferred

FC 6:1.1 2305843096692482699<->2377900690730410635 vmhba2:1:0 On active

vicfg-mpath.pl --server 206.47.128.91 --state off --lun vmhba2:0:0 --path vmhba2:0:0
:
Setting vmhba2:0:0 -- vmhba2:0:0 state to off

These changes can also be made in the VI client. Go to Configuration and select Storage. Then select the LUN to be managed, click on properties and then Manage Paths. On the Manage Paths windows you can change the policy between Fixed and MRU (most recently used) as shown in the 2nd image below. You can also change the state of the path as shown in the 3rd image. The preferred path option will only be available when the policy is set to fixed.




INSERT YOUR COMMENT - IF YOU HAVE A QUESTION PLEASE USE THE FORUM


Name (required)

Web Site (optional)

Email address (required - will not be displayed)

Comment (required)

Please enter code

 

Copyright © 2011 - Dave Mishchenko