How to configure device-mapper-multipath

Applies to: ---------------------------------------------------------------------------------------------------------- Enterprise Linux 5.x**
Problem:
**How do I configure device-mapper-multipath?
Solution: ---------------------------------------------------------------------------------------------------------- 1. Verify that your device-mapper and multipath driver are at least the version shown below or higher by running the command: rpm -qa | grep device-mapper
device-mapper-1.02.28-2.el5 device-mapper-multipath-0.4.7-23.el5.4.0.1 device-mapper-event-1.02.28-2.el5 2. Identify your local disks i.e. /dev/sda. Once your local disk is determined run the following command to obtain its scsi_id: scsi_id –gus /block/sda
360024e805314c20011faf391033bdece 3. Open the /etc/multipath.conf file and locate and comment out the section below:
blacklist {
devnode “*”
}
- Once the scsi_id of your local disk has been retrieved, you must blacklist this scsi_id from being used as a multipath device. Within /etc/multipath.conf file and locate, uncomment, and modify the section below:
blacklist { wwid devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)*" devnode "^hd" } 5. Uncomment your defaults section within your /etc/multipath.conf
defaults { udev_dir /dev polling_interval 10 selector "round-robin 0" path_grouping_policy multibus getuid_callout "/sbin/scsi_id -g -u -s /block/%n" prio_callout /bin/true path_checker readsector0 rr_min_io 100 max_fds 8192 rr_weight priorities failback immediate no_path_retry fail user_friendly_names yes } 6. Locate the multipaths section within your /etc/multipath.conf file. In this section you will provide the scsi_id of each iSCSI volume and provide an alias in order to keep a consistent naming convention across all of your OVM Server nodes. An example is shown below:
multipaths { multipath { wwid alias alias_of_volume1 } multipath { wwid alias alias_of_volume2 } }
NOTE: Additional multipath subsections can be added to meet the number of volumes you need.
- Restart your multipath daemon service using the following command:
service multipathd restart 8. Verify that your multipath volumes alias are displayed properly by running the following command:multipath –ll
Alias_of_volume1 (scsi_id of volume1) dm-2 EQLOGIC,100E-00
\ round-robin 0 \ 6:0:0:0 sdaj 66:48 \ 4:0:0:0 sdag 66:0 \ 3:0:0:0 sdd 8:48 \_ 5:0:0:0 sdn 8:208 9. Make sure the iSCSI service starts upon boot using the command:
chkconfig multipathd on