background image

DM Multipath

Red Hat Enterprise Linux 5.1 DM Multipath

Device-Mapper Multipath Configuration and Administration

Edition 1.0

Copyright 

©

 2008 Red Hat, Inc. This material may only be distributed subject to the terms and

conditions set forth in the Open Publication License, V1.0 or later with the restrictions noted below (the
latest version of the OPL is presently available at 

http://www.opencontent.org/openpub/

).

Distribution of substantively modified versions of this document is prohibited without the explicit
permission of the copyright holder.

Distribution of the work or derivative of the work in any standard (paper) book form for commercial
purposes is prohibited unless prior permission is obtained from the copyright holder.

Red Hat and the Red Hat "Shadow Man" logo are registered trademarks of Red Hat, Inc. in the United
States and other countries.

All other trademarks referenced herein are the property of their respective owners.

The GPG fingerprint of the [email protected] key is:

CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E

   1801 Varsity Drive
   Raleigh, NC 27606-2072USAPhone: +1 919 754 3700
   Phone: 888 733 4281
   Fax: +1 919 754 3701
   PO Box 13588Research Triangle Park, NC 27709USA
  

This book provides information on using the Device-Mapper Multipath feature of Red Hat Enterprise
Linux 5.1

Summary of Contents for ENTERPRISE LINUX 5.1 DM MULTIPATH

Page 1: ...Red Hat Enterprise Linux 5 1 DM Multipath Device Mapper Multipath Configuration and Administration ...

Page 2: ...ion of the work or derivative of the work in any standard paper book form for commercial purposes is prohibited unless prior permission is obtained from the copyright holder Red Hat and the Red Hat Shadow Man logo are registered trademarks of Red Hat Inc in the United States and other countries All other trademarks referenced herein are the property of their respective owners The GPG fingerprint o...

Page 3: ...ing Local Disks when Generating Multipath Devices 8 3 3 Adding Devices to the Multipathing Database 10 4 The DM Multipath Configuration File 11 4 1 Configuration File Overview 11 4 2 Configuration File Blacklist 12 4 2 1 Blacklisting by WWID 12 4 2 2 Blacklisting By Device Name 12 4 2 3 Blacklisting By Device Type 13 4 2 4 Blacklist Exceptions 13 4 3 Configuration File Defaults 14 4 4 Multipaths D...

Page 4: ...iv ...

Page 5: ...Hat Cluster components LVM Administrator s Guide Configuration and Administration Provides a description of the Logical Volume Manager LVM including information on running LVM in a clustered environment Global File System Configuration and Administration Provides information about installing configuring and maintaining Red Hat GFS Red Hat Global File System Using GNBD with Global File System Provi...

Page 6: ...t system input including shell commands file names and paths Also used to highlight key caps and key combinations For example To see the contents of the file my_next_bestselling_novel in your current working directory enter the cat my_next_bestselling_novel command at the shell prompt and press Enter to execute the command The above includes a file name a shell command and a key cap all presented ...

Page 7: ... used to indicate traversal through a menu and its sub menus This is to avoid the difficult to follow Select Mouse from the Preferences sub menu in the System menu of the main menu bar approach Mono spaced Bold Italic or Proportional Bold Italic Whether Mono spaced Bold or Proportional Bold the addition of Italics indicates replaceable or variable text Italics denotes text you do not input literal...

Page 8: ...s scripts svgs Source code listings are also set in Mono spaced Roman but are presented and highlighted as follows package org jboss book jca ex1 import javax naming InitialContext public class ExClient public static void main String args throws Exception InitialContext iniCtx new InitialContext Object ref iniCtx lookup EchoBean EchoHome home EchoHome ref Echo echo home create System out println C...

Page 9: ...ration changes that only apply to the current session or services that need restarting before an update will apply Ignoring Important boxes won t cause data loss but may cause irritation and frustration Warning A Warning should not be ignored Ignoring warnings will most likely cause data loss ...

Page 10: ...x ...

Page 11: ...h the cable switch or controller fails DM Multipath switches to an alternate path Improved Performance DM Multipath can be configured in active active mode where I O is spread over the paths in a round robin fashion In some configurations DM Multipath can detect loading on the I O paths and dynamically re balance the load Figure 1 1 Active Passive Multipath Configuration with One RAID Device shows...

Page 12: ...ultipath Configuration with Two RAID Devices As in the example shown in Figure 1 1 Active Passive Multipath Configuration with One RAID Device there are two I O paths to each RAID device With DM Multipath configured a failure at any of the points of the I O path to either of the RAID devices will cause DM Multipath to switch to the alternate I O path for that device Figure 1 3 Active Active Multip...

Page 13: ...ath Configuration File Some storage arrays require special handling of I O errors and path switching These require separate hardware handler kernel modules 1 3 DM Multipath Components Table 1 1 DM Multipath Components describes the components of DM Multipath Component Description dm multipath kernel module Reroutes I O and supports failover for paths and path groups multipath command Lists and con...

Page 14: ...default settings that are suitable for common multipath configurations Setting up DM multipath is often a simple procedure The basic procedure for configuring your system with DM Multipath is as follows 1 Install device mapper multipath rpm 2 Edit the multipath conf configuration file comment out the default blacklist change any of the existing defaults as needed save the configuration file 3 Star...

Page 15: ...ces to access the multipathed devices for example when creating logical volumes The devices in dev mpath are provided as a convenience so that all multipathed devices can be seen in one directory These devices are created by the udev device manager and may not be available on startup when the system needs to access them Do not use these devices for creating logical volumes or filesystems Any devic...

Page 16: ...devices you can use the multipath device names just as you would use a physical device name when creating an LVM physical volume For example if dev mapper mpath0 is the name of a multipath device the following command will mark dev mapper mpath0 as a physical volume pvcreate dev mapper mpath0 You can use the resulting LVM physical device when you create an LVM volume group just as you would use an...

Page 17: ... it out to enable multipathing blacklist devnode After commenting out those lines this section appears as follows blacklist devnode 2 The default settings for DM Multipath are compiled in to the system and do not need to be explicitly set in the etc multipath conf file The default value of path_grouping_policy is set to failover so in this example you do not need to change the default value For in...

Page 18: ...es have local SCSI cards for their internal disks DM Multipath is not recommended for these devices The following procedure shows how to modify the multipath configuration file to ignore the local disks when configuring multipath 1 Determine which disks are the internal disks and mark them as the ones to blacklist In this example dev sda is the internal disk Note that as originally configured in t...

Page 19: ... using a devnode type that would not be safe procedure since dev sda is not guaranteed to be the same on reboot To blacklist individual devices you can blacklist using the WWID of that device Note that in the output to the multipath vs command the WWID of the dev sda device is SIBM ESXSST336732LC____F3ET0EP0Q000072428BX1 To blacklist this device include the following in the etc multipath conf file...

Page 20: ...e By default DM Multipath includes support for the most common storage arrays that support DM Multipath The default configuration values including supported devices can be found in the multipath conf defaults file If you need to add a storage device that is not supported by default as a known multipath device edit the etc multipath conf file and insert the appropriate device information For exampl...

Page 21: ... need for your configuration or that you wish to change from the default values specified in the multipath conf defaults file If there are sections of the file that are not relevant to your environment or for which you do not need to override the default values you can leave them commented out as they are in the initial file The configuration file allows regular expression description syntax An an...

Page 22: ... in Section 3 1 Setting Up DM Multipath After commenting out the universal blacklist you can specify general device types and individual devices to blacklist You can blacklist devices according to the following criteria By WWID as described in Section 4 2 1 Blacklisting by WWID By device name as described in Section 4 2 2 Blacklisting By Device Name By device type as described in Section 4 2 3 Bla...

Page 23: ...thing on any of these devices you would need to specify them in the blacklist_exceptions section of the configuration file as described in Section 4 2 4 Blacklist Exceptions blacklist devnode ram raw loop fd md dm sr scd st 0 9 devnode hd a z 4 2 3 Blacklisting By Device Type You can specify specific device types in the blacklist section of the configuration file with a device section The followin...

Page 24: ...lts user_friendly_names yes This overwrites the default value of the user_friendly_names parameter The configuration file includes a template of configuration defaults This section is commented out as follows 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_...

Page 25: ...1 priority group per target node name The default value is failover getuid_callout Specifies the default program and arguments to call out to obtain a unique path identifier An absolute path is required The default value is sbin scsi_id g u s prio_callout Specifies the the default program and arguments to call out to obtain a path priority value For example the ALUA bits in SPC 3 provide an exploi...

Page 26: ...es that the system should use use the WWID as the alias for the multipath In either case what is specified here will be overriden by any device specific aliases you specify in the multipaths section of the configuration file The default value is no Table 4 1 Multipath Configuration Defaults 4 4 Multipaths Device Configuration Attributes Table 4 2 Multipath Attributes shows the attributes that you ...

Page 27: ...in a path group will always have the same priority If set to uniform all path weights are equal no_path_retry A numeric value for this attribute specifies the number of times the system should attempt to use a failed path before disabling queueing A value of fail indicates immediate failure without queueing A value of queue indicates that queuing should not stop until the path is fixed rr_min_io S...

Page 28: ... vendor and product parameters You can find these values by looking at sys block device_name device vendor and sys block device_name device model where device_name is the device to be multipathed as in the following example root cypher 06 cat sys block sda device vendor WINSYS root cypher 06 cat sys block sda device model SF2372 The additional parameters to specify depend on your specific device I...

Page 29: ...th_selector Specifies the default algorithm to use in determining what path to use for the next I O operation failback Specifies path group failback A value of 0 or immediate specifies that as soon as there is a path group whith a higher priority than the current path group the system switches to that path group A numeric value greater than zero specifies deferred failback expressed in seconds A v...

Page 30: ...pecifies the number of times the system should attempt to use a failed path before disabling queueing A value of fail indicates immediate failure without queuing A value of queue indicates that queuing should not stop until the path is fixed The default value is null Table 4 3 Device Attributes The following example shows a device entry in the multipath configuration file device vendor COMPAQ prod...

Page 31: ...ultipath device you get a printout of the current device setup The format is as follows For each multipath device action_if_any alias wwid_if_different_from_alias size features hardware_handler For each path group _ scheduling_policy path_group_priority_if_known path_group_status_if_known For each path _ host channel id lun devnode major minor path_status dm_status_if_known For example the output ...

Page 32: ...ered from information in sysfs and the device mapper The ll option displays the information the l displays in addition to all other available components of the system When displaying the multipath configuration there are three verbosity levels you can specify with the v option of the multipath command Specifying v0 yields no output Specifying v1 outputs the created or updated multipath names only ...

Page 33: ...h1 253 3 mpath6p1 253 14 mpath7p1 253 13 mpath0 253 2 mpath7 253 9 mpath6 253 8 VolGroup00 LogVol01 253 1 mpath5 253 7 VolGroup00 LogVol00 253 0 mpath4 253 6 mpath1p1 253 10 mpath3 253 5 5 5 Troubleshooting with the multipathd Interactive Console The multipathd k command is an interactive interface to the multipathd daemon Entering this command brings up an interactive multipath console After ente...

Page 34: ...ng 24 The following command sequence ensures that multipath has picked up any changes to the multipath conf multipathd k reconfigure CTRL D Use the following command sequence to ensure that the path checker is working properly multipathd k show paths CTRL D ...

Page 35: ...25 Appendix A Revision_History Revision History Revision 5 1 0 Wed Feb 07 2007 Michael HideoSmithmhideo redhat com Resolves 223810 Fix complete English only ...

Page 36: ...26 ...

Page 37: ... prio_callout parameter 15 18 product parameter 18 product_blacklist parameter 18 rr_min_io parameter 15 16 rr_weight parameter 15 16 18 selector parameter 15 udev_dir parameter 15 user_friendly_names parameter 14 15 vendor parameter 18 wwid parameter 16 configuring DM Multipath 7 D defaults section multipath conf file 14 dev mapper directory 5 dev mpath directory 5 device name 5 device mapper mul...

Page 38: ...le 23 multipathd daemon 3 multipathd start command 7 multipaths section multipath conf file 16 N no_path_retry parameter 15 16 18 P path_checker parameter 15 18 path_grouping_policy parameter 15 16 18 path_selector parameter 16 18 polling_interval parameter 15 prio_callout parameter 15 18 product parameter 18 product_blacklist parameter 18 R rr_min_io parameter 15 16 rr_weight parameter 15 16 18 S...

Reviews: