Multipathing is used for Load Balancing, path failover & Recover for block devices in Linux.
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.
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
#mv multipath.conf multipath.conf.dist
#sed ‘/^#/d; /^$/d’ multipath.conf.dist > multipath.conf
Change to blacklist local hard drive only,
- Now start the Multipath service
#Service Multipathd start
#chkconfig Multipathd on
- Now Verify the disk paths
#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