Multipath

From LUG
Revision as of 11:49, 3 January 2018 by Dawes001 (talk | contribs)
Jump to navigation Jump to search


Multipath

What Is Multipathing?

Multipathing is the ability of a server to communicate with the same physical or logical block storage device across multiple physical paths between the host bus adapters in the server and the storage controllers for the device, typically in Fibre Channel (FC) or iSCSI SAN environments. You can also achieve multiple connections with direct attached storage when multiple channels are available.

Benefits of Multipathing

Linux multipathing provides connection fault tolerance and can provide load balancing across the active connections. When multipathing is configured and running, it automatically isolates and identifies device connection failures, and reroutes I/O to alternate connections.

Typical connection problems involve faulty adapters, cables, or controllers. When you configure multipath I/O for a device, the multipath driver monitors the active connection between devices. When the multipath driver detects I/O errors for an active path, it fails over the traffic to the device's designated secondary path. When the preferred path becomes healthy again, control can be returned to the preferred path.

Documentation on the Internet

The Linux multipath implementation : http://christophe.varoqui.free.fr/refbook.html

Managing MP io devices : http://www.novell.com/documentation/sles10/stor_evms/index.html?page=/documentation/sles10/stor_evms/data/mpioovw.html

Nice howto and inside info : Red Hat Multipathing


Starting an interactive shell

]# multipathd -k

multipathd will enter interactive mode. From this mode, the available commands can be viewed by entering "help". When you are finished entering commands, press CTRL-D to quit.

Commands

The following commands can be used in interactive mode:

list|show paths : Show the paths that multipathd is monitoring, and their state.

list|show maps|multipaths : Show the multipath devices that the multipathd is monitoring.

list|show maps|multipaths status : Show the status of all multipath devices that the multipathd is monitoring.

list|show maps|multipaths stats : Show some statistics of all multipath devices that the multipathd is monitoring.

list|show maps|multipaths topology : Show the current multipath topology. Same as "multipath -ll".

list|show topology : Show the current multipath topology. Same as "multipath -ll".

list|show map|multipath $map topology : Show topology of a single multipath device specified by $map, e.g. 36005076303ffc56200000000000010aa. This map could be obtained from "list maps".

list|show config : Show the currently used configuration, derived from default values and values specified within the configuration file /etc/multipath.conf.

list|show blacklist : Show the currently used blacklist rules, derived from default values and values specified within the configuration file /etc/multipath.conf.

list|show devices : Show all available block devices by name including the information if they are blacklisted or not.

add path $path : Add a path to the list of monitored paths. $path is as listed in /sys/block (e.g. sda).

remove|del path $path : Stop monitoring a path. $path is as listed in /sys/block (e.g. sda).

add map $map : Add a multipath device to the list of monitored devices. $map can either be a device-mapper device as listed in /sys/block (e.g. dm-0) or it can be the alias for the multipath device (e.g. mpath1) or the uid of the multipath device (e.g. 36005076303ffc56200000000000010aa).

remove|del map $map : Stop monitoring a multipath device.

switch|switchgroup map $map group $group : Force a multipath device to switch to a specific path group. $group is the path group index, starting with 1.

reconfigure : Reconfigures the multipaths. This should be triggered automatically after any hotplug event.

suspend map|multipath $map :Sets map $map into suspend state.

resume map|multipath $map : Resumes map $map from suspend state.

fail path $path : Sets path $path into failed state.

reinstate path $path : Resumes path $path from failed state.

Tasks

Add New Multipath Block Device

Remove Multipath Block Device

Resize Multipath Block Device