Device-mapper-multipath Components
Device-mapper-multipath have following four components:
dm-multipath kernel module
Reroutes I/O and supports failover for paths and path groups.
multipath command
Lists and configures multipath devices. Normally started up with /etc/rc.sysinit in RHEL5/6, systemd in RHEL7, it can also be started up by a udev program whenever a block device is added or it can be run by the initramfs file system.
multipathd daemon
Monitors paths; as paths fail and come back, it may initiate path group switches. Provides for interactive changes to multipath devices. Command service multipathd reload need to execute for any changes to the /etc/multipath.conf file.
kpartx command
Creates device mapper devices for the partitions on a device It is necessary to use this command for partitions with DM-MP. The kpartx is provided in its own package, but the device-mapper-multipath package depends on it.
Device-mapper-multipath Configuration
Device-mapper-multipath configuration file /etc/multipath.conf have following sections which different useage and prioirity.
defaults
Fallback configurations when a item is not configured in other sections
blacklist
blacklist devices by "wwid", "devnode", "device"
blacklist_exceptions
exceptions of devices which alreay match blacklist sections. Please be informed that blacklist_exceptions should follow exactly same type in blacklist section, i.e.,
blacklist {
wwid *
}
blacklist_exceptions {
wwid "IBM.75000000092461.4d00.34"
}
multipaths
Using wwid to match mpath, holding the configuration for this LUN.
devices
Using device vendor and product name to match scsi devices, holding the configuration for this type of LUN. Normally used for pre-defined LUN.
Generally, multipath configuration is following this order of priority:
multipaths > devices > defaults
Notes:
Match-first role for multipath.conf
Multipath is using match-first configuration in this section,hence, if you want to change some pre-defined devices configuration, please copy everything out and make change like this:
devices{
device {
vendor "NETAPP"
product "LUN.*"
path_grouping_policy group_by_prio
getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
path_selector "round-robin 0"
path_checker directio
features "1 queue_if_no_path"
hardware_handler "alua" #this is what we modified
prio ontap
failback immediate
rr_weight uniform
rr_min_io 128
}
}
For the rest of documents, if not specified, "default configuration" means configurations in defaults sections.
For detail information about configuration, please check /usr/share/doc/device-mapper-multipath* or check by man multipath.conf.
