Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Applications > Global File System (GFS) > Issue <<  1 of 71 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 7170
Last update: 07-01-08
Issue:
How do I setup device-mapper multipathing in Red Hat Enterprise Linux 4?
Resolution:

Release Found: Red Hat Enterprise Linux 4 Update 2 and later

In order to setup device-mapper-multipathing an updated system with the package device-mapper-multipath is recommended.

This functionality does not exist in releases of Red Hat Enterprise Linux 4 prior to Update 2.

To set up device-mapper multipathing, edit the /etc/multipath.conf file. Comment out the following lines at the top of the file:

devnode_blacklist {
        devnode "*"
}

For example:

# devnode_blacklist {
#        devnode "*"
# }

This section keeps device-mapper multipathing from scanning all of the devices. Uncomment the following section of the /etc/multipath.conf file:

defaults {
       multipath_tool  "/sbin/multipath -v0"
       udev_dir        /dev
       polling_interval 10
       default_selector        "round-robin 0"
       default_path_grouping_policy    multibus
       default_getuid_callout  "/sbin/scsi_id -g -u -s /block/%n"
       default_prio_callout    "/bin/true"
       default_features        "0"
       rr_min_io              100
       failback                immediate
}
blacklist {
        wwid 26353900f02796769
       devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
       devnode "^hd[a-z][[0-9]*]"
       devnode "^cciss!c[0-9]d[0-9]*[p[0-9]*]"
}

This sets the default device-mapper behavior and filters out all the devices that are not normally multipathed, such as IDE hard drives and floppy drives. In order to use simple failover behaviour, the default_path_grouping_policy option in the defaults section should be changed to failover as illustrated by the sample below:

defaults {
       multipath_tool  "/sbin/multipath -v0"
       udev_dir        /dev
       polling_interval 10
       default_selector        "round-robin 0"
       default_path_grouping_policy    failover
       default_getuid_callout  "/sbin/scsi_id -g -u -s /block/%n"
       default_prio_callout    "/bin/true"
       default_features        "0"
       rr_min_io              100
       failback                immediate
}

Save the configuration file and exit the editor. Execute the following commands:

modprobe dm-multipath
modprobe dm-round-robin
service multipathd start
multipath -v2

The multipath -v2 command prints out multipathed paths that show which devices are multipathed. If the command does not print anything out, ensure that all SAN connections are set up properly and the system is multipathed. Execute this command to make sure that the multipath daemon starts on bootup:

chkconfig multipathd on

The devices will be created as /dev/mapper/mpath#, where # is the multipathed group. If /dev/sda is the only multipathed device, /dev/mapper/mpath0 will be the multipathed device for /dev/sda and /dev/sdb. Note that fdisk cannot be used with /dev/dm-# devices. Use fdisk on the underlying disks and execute the following command when device-mapper multipath maps the device to create a /dev/mapper/mpath# device for the partition:

kpartx -a /dev/mapper/mpath#

Note: dmsetup ls --target=multipath is a command that helps determine multipath devices assignments on a system.

If the hardware is not mentioned in the multipathing database, please view the article "How can I add more products into the mutipathing database?" in the Recommended FAQs section.

For an updated sample configuration file, see /usr/share/doc/device-mapper-multipath-<version>/multipath.conf.annotated


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Applications > Global File System (GFS) > Issue <<   1  of  71  >>