Linux Multipath Setup Howto

Multipathing was added to the linux kernel in version 2.6.13.
Redhat backported it to RHAS4 - update 2.
NOTE: RHAS4 - Update 2 required

REQUIRED READING:

"SAN Persistent Binding and Multipathing in the 2.6 Kernel" (2nd half) : explains the different multipath.conf configuration settings and parameters, how to find them and how to select which ones to use.

Steps

  1. up2date device-mapper-multipath
  2. Edit /etc/multipath.conf
    For detailed information, see: "SAN Persistent Binding and Multipathing in the 2.6 Kernel"
  3. modprobe dm-multipath
  4. modprobe dm-round-robin
  5. service multipathd start
  6. multipath -v2
    Will show multipath luns and groups. Look for the multipath group number, this is the dm-# listed in /proc/partitions. The multipath lun is accessed via the /dev/dm-# device entry.
  7. Format each SCSI DEVICE:
    • sfdisk /dev/sdX
  8. (Optional) Create multipath devices for each partition:
    (not needed if using LVM, since you will just mount the logical volume device)
    • kpartx -a /dev/dm-#
  9. Enable multipath to start on bootup:
    • chkconfig multipathd on

Other useful cmds

multipath -F
Clear all multipath bindings. Useful when making changes to /etc/multipath.conf (clear multipath map, then run multipath to read the config file and build a new map).
multipath -v3 -ll
List lots of information about all known disks, what multipath groups they belong to, settings, etc...
(NOTE: the -ll also seems to force multipathd to pick up (rescan for) new devices that might have been added to the system but not recognized by mutlipathd yet.)
dmsetup ls --target=multipath
Determine multipath device assignments on a system.