Multipathing is used for Load Balancing, path failover & Recover for block devices in Linux.
Load balancing:
The workload is distributed across the available hardware components.
Path failover & Recover:
Will use redundant I/O channels to redirect the read and write operations when one or more paths no longer available.
Prerequisites RPM’s:
- device-mapper-1.02.77-9.el6.x86_64
- device-mapper-multipath-libs-0.4.9-64.0.1.el6.x86_64
- device-mapper-multipath-0.4.9-64.0.1.el6.x86_64
Daemon: Multipathd
Configuration file: /etc/multipath.conf
The “multipath.conf” has five sections:
- System level defaults
- Blacklisted devices
- Blacklist exceptions
- Storage controller specific settings
- Device specific settings
Simple steps to configure multipath:
- For configuring the Multipath in Redhat Linux, device-mapper-multipath should be installed. You can verify It by using below command that it is installed or not:
#rpm -q device-mapper*
- If it is not installed, install it by using below command.
#yum install device-mapper
- After installation, start to configure multipath
#cd /etc
#mv multipath.conf multipath.conf.dist
#sed ‘/^#/d; /^$/d’ multipath.conf.dist > multipath.conf
#vi multipath.conf
Change to blacklist local hard drive only,
blacklist {
devnode “sda”
}
- Now start the Multipath service
#Service Multipathd start
#chkconfig Multipathd on
- Now Verify the disk paths
#fdisk -l
#sfdisk –s
Commands:
#service Multipathd start – to start the multipath service
#service Multipathd stop – to stop the multipath service
#service Multipathd reload – To update the modified configurations to replicate without restarting the service.
#multipath –ll – To list all the multipathed devices
#multipath –F – to stop the multipath