Storage Device Mapper Multipath Configuration

What is DM-Multipath
Device Mapper – Multipath : Scan the multipath device and update in the device mapper (/dev/mapper).
DM-MULTIPATH is used to provide fail over capabilities.
1)redundancy (Active/Passive)
2)Improve Performance (Active/Active)
/etc/multipath.conf- > is used to create the reasonable alias for the LUN.
To create the alias for the LUN we need the WWID(World Wide Identifier ) of the storage.
How To configure DM-Multipath
Step 1) Get the wwid using #multipath -ll (list the Multipath device)
Step 2)Update the wwid in the /etc/multipath.conf and comment the blacklist.
Step 3)Restart multipathd daemon and #fdisk -l check the list the devices
Multipathd : Depending on the failback policy. it will be reactive the path.

WWID
it is unique and unchanged. World Wide Identifier
WWN
World wide Name.
LUN
Logical Unit Number is a logical disk created by SAN
#multipath
Display the Multipath device.
#dmsetup
Display the Device map entry.
Kpartx
create device mapper from partition table.

To install multipath and device Mapper.
1)Install Device Mapper Mutlipath ( device-mapper-multipath rpm)
2)check multipath driver is loaded or not (#lsmod | grep multipath)
Useful Command
1)#multipath -ll  ( we can get the wwid of storage ) #multipathd -k
2)#ls /dev/mapper/*
Multipath Verification
# dmsetup ls
mpath2  (253, 4)
mpath4p1        (253, 12)

Display device map entry map multipath entry.
Display major number and minor number
1)Minor Number 4 corresponding to the multipath device is /dev/dm-4
2)Major Number should be unique
#multipath -v2
#multipath -v3
Configure & Display the Multipath Map Information.

Useful Link
https://wiki.hiit.fi/display/it/SAN+disks+on+Linux+%28multipath%29
https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Configuration_Example_-_Oracle_HA_on_Cluster_Suite/multipath_configuration.html
http://www.linuxquestions.org/questions/linux-enterprise-47/mapping-luns-to-multipath-devices-787070/
http://www.datacenters.ro/img/hot_topics/27/sectiune2.jpg
Storage Multipath Interview Question and Answer

Related post