Friday, February 8, 2013

Redhat Device Mapper Multipathing

                                           REDHAT DEVICE MAPPER MULTIPATH



                                  



1) DM Software Installation


yum install device-mapper-multipath


2) Initialize /etc/multipath.conf file


mpathconf --enable


3) Start multipath service

service multipathd start


4) If you do not want to use user friendly name


mpathconf --enable --user_friendly_names n


5) Ignoring Local Disks when generating Multipath devices


multipath -v2 (shows local disk, /dev/sda, in the multipath map)


create: SIBM-ESXSST336732LC____F3ET0EP0Q000072428BX1 undef WINSYS,SF2372 size=33 GB features="0" hwhandler="0" wp=undef `-+- policy='round-robin 0' prio=1 status=undef
- 0:0:0:0 sda 8:0 [---------



device-mapper ioctl cmd 9 failed: Invalid argument device-mapper ioctl cmd 14 failed: No such device or address

create: 3600a0b80001327d80000006d43621677 undef WINSYS,SF2372 size=12G features='0' hwhandler='0' wp=undef `-+- policy='round-robin 0' prio=1 status=undef
- 2:0:0:0 sdb 8:16 undef ready running `- 3:0:0:0 sdf 8:80 undef ready running



create: 3600a0b80001327510000009a436215ec undef WINSYS,SF2372 size=12G features='0' hwhandler='0' wp=undef `-+- policy='round-robin 0' prio=1 status=undef
- 2:0:0:1 sdc 8:32 undef ready running `- 3:0:0:1 sdg 8:96 undef ready running



In order to prevent the device mapper from mapping /dev/sda in its multipath maps, edit blacklist section in /etc/multipath.conf

blacklist {

wwid SIBM-ESXSST336732LC____F3ET0EP0Q000072428BX1

}


6) After updating file reload the changes


service multipathd reload


7) Run following command to remove multipath device

multipath -f SIBM-ESXSST336732LC____F3ET0EP0Q000072428BX1


8) Now check if device removed from multipath


multipath

create: 3600a0b80001327d80000006d43621677 undef WINSYS,SF2372 size=12G features='0' hwhandler='0' wp=undef `-+- policy='round-robin 0' prio=1 status=undef
- 2:0:0:0 sdb 8:16 undef ready running `- 3:0:0:0 sdf 8:80 undef ready running


create: 3600a0b80001327510000009a436215ec undef WINSYS,SF2372 size=12G features='0' hwhandler='0' wp=undef `-+- policy='round-robin 0' prio=1 status=undef
- 2:0:0:1 sdc 8:32 undef ready running `- 3:0:0:1 sdg 8:96 undef ready running


...

....

...


9) Add storage that is not supported by default as a know multipath device lets say "Vendor is HP, Product Open-V"

To add information about the HP Open-V series the entry looks like this, where %n is the device name. Add following in /etc/multipath.conf file

devices {

device {

vendor "HP"

product "OPEN-V."

getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"

}

}


To be continued..............

3 comments:

  1. Hello, thank you for the tutorial.
    I would like to know if is it possible with multipath make use of two paths to write in parallel on the disk.
    Under wich conditions the option
    path_selector round-robin
    can realize the parallel writing on disk?
    My storage has two HBA (dual port each) in active/active configuration
    why, using multipath, I see only one path active?

    ReplyDelete