Header Ads

How to Configure Multipathing in Linux (RHEL7 / CentOS7)

How to Configure Multipathing in Linux (RHEL7 / CentOS7)

This post will show you How to Configure Multipathing in Linux (RHEL7 / CentOS7).

If you are interested in learning, Request you to go through the below recommended tutorial.

How to Configure Multipathing in Linux (RHEL7 / CentOS7)

This article describes you the step by step procedure to configure multipathing in Linux (RHEL7/CentOS7) using Device Mapper Multipathing (DM-Multipath) and helps you to understand the multipath configuration..

What is Device Mapper Multipathing?

Device Mapper Multipathing (DM-Multipath) is a native multipathing in Linux, Device Mapper Multipathing (DM-Multipath) can be used for Redundancy and to Improve the Performance. It aggregates or combines the multiple I/O paths between Servers and Storage, so it creates a single device at the OS Level.

For example, Lets say a server with two HBA card attached to a storage controller with single ports on each HBA cards. One lun assigned to the single server via two wwn number of both cards. So OS detects two devices: /dev/sdb and /dev/sdc. Once we installed the Device Mapper Multipathing. DM-Multipath creates a single device with a unique WWID that reroutes I/O to those four underlying devices according to the multipath configuration. So when there is a failure with any of this I/O paths, Data can be accessible using the available I/O Path.

1. Install Device Mapper Multipath package.

Verify the device-mapper-multipath package has been installed or not.
[root@linux1 ~]# rpm -q device-mapper-multipath

If it is not installed, Install the Device Mapper Multipath package using yum to avoid dependencies issue. if yum is not configured, please refer the link Yum Configuration on Linux
[root@linux1 ~]# yum -y install device-mapper-multipath

2. Basic Configuration of Linux Device Mapper Multipathing

Configuration file is /etc/multipath.conf file, take a backup of it. Edit the configuration file to ensure you have the following entries uncommented out.
defaults {
user_friendly_names yes
blacklist {
devnode “sda”

The blacklist includes the devices which are not to be configured in Multipathing. For example, Lets say our OS installed disk is /dev/sda. So the first entry in the blacklist will exclude them. Same for IDE drives (hd).

3. Start and Enable multipath daemons.

Start multipath service if not started bydefault.
[root@linux1 ~]# systemctl start multipathd

Enable the multipath service to start on boot.
[root@linux1 ~]# systemctl enable multipathd

4. Check multipathing status.

The multipath -ll command prints out multipathed paths that show which devices are multipathed. If the command does not print anything out, ensure that all SAN connections are set up properly and the system is multipathed.
[root@linux1 ~]# multipath -ll
mpathb (360014051f89d2bb3300470fa7d4baa10) dm-2 LIO-ORG ,lun0
size=2.0G features='0' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=0 status=active
| `- 1:0:0:0 sdb 8:16 active active running
`-+- policy='service-time 0' prio=0 status=enabled
`- 2:0:0:0 sdc 8:32 active active running

The above output shows 1 LUN (mpathb) with 2 paths (sdb and sdc). Linux Multipathing basic configuration is done. Refer this link to check further for  troubleshooting any issue related with multipathing and also understand its terminologies.

Hope you have got an idea How to Configure Multipathing in Linux (RHEL7 / CentOS7).

Related Content on Linux might be useful to you to improve your Linux Skills.

Keep practicing and have fun. Leave your comments if any.

Support Us: Share with your friends and groups.

Stay connected with us on social networking sites, Thank you.

configure multipath in linux, How to configure multipathing on linux, multipath configuration in linux, linux multipath command, linux multipathing

Powered by Blogger.