cancel
Showing results for 
Search instead for 
Did you mean: 

Multipathing in Linux

arkie
Super Advisor

Multipathing in Linux

How can I get over the issue of 1 Virtual Disk in Shared Storage (EVA 6000) mapped to more than 1 (2 or more..) block device files within the Linux OS (my Linux is RHEL AS 4.0 Update 5 for Itanium). How can I get exactly 1 device file for 1 Vdisk inspite of having redundant server-storage links
2 REPLIES
Ivan Ferreira
Honored Contributor

Re: Multipathing in Linux

Normally, this is done with the HBA driver. For example, qlogic provides a driver that you can enable multipath support.

Please check your HBA model and check the driver documentation for detailed information about how to enable multipath support.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Matti_Kurkela
Honored Contributor

Re: Multipathing in Linux

The handling of multipathing in Linux has been in a flux for a while.

Some FibreChannel drivers (mainly Qlogic) have this functionality in the FibreChannel card drivers. However, this was not considered the right place for this functionality: the multipath functionality should be independent of HBA drivers, to allow its use across different HBA models.

With Linux 2.4 kernel series, there used to be a "multipath" mode in the md (software RAID) subsystem, which could be used to create a single device that refers to both links. This provided a new /dev/md* device _in addition_ to the individual /dev/sd* paths. You can also use this style with Linux 2.6 kernel, but I understand this is not recommended for new setups.

With Linux 2.6 kernel series (like in RHEL AS4), this functionality has been re-implemented in the "device mapper" subsystem. This is available in RHEL AS4, if you install the "device-mapper-multipath" package. ("up2date --install device-mapper-multipath")

See:
http://kbase.redhat.com/faq/FAQ_85_7170.shtm
http://kbase.redhat.com/faq/FAQ_96_11196.shtm

Simply installing the package does not immediately activate it. You should read the documentation that comes with the package: it will be installed in /usr/share/doc/device-mapper-multipath.

You must load the dm-multipath kernel module, then edit /etc/multipath.conf according to the documentation to enable the functionality.

Then use "multipath -d -v2" to verify the system understands the multipath devices correctly: it should show you it's about to create one or more /dev/mpath* devices, which each will map to two or more /dev/sd* devices. If this mapping is correct, you should run "multipath -v2" to actually enable the multipathing. If it's not correct, refer to the documentation: you may need some extra settings in /etc/multipath.conf.

The next step is to enable and start the multipathd daemon to monitor the multipath devices:

chkconfig --add multipathd
sh /etc/init.d/multipathd start

After this, you can start referring to your disk using a /dev/mpath* device instead of the /dev/sd* one.

If you're using LVM on the virtual disk, you should then edit /etc/lvm/lvm.conf to make sure the LVM will use the /dev/mpath* device and leave the individual /dev/sd* paths alone.
For more info, refer to
http://kbase.redhat.com/faq/FAQ_96_11252.shtm

MK
MK