background image

DM-Multipath Administration and

Troubleshooting

This chapter will provide information on administering DM-Multipath on a running system. It

includes sections on the following topics:

• Multipath Command Output

• Multipath Queries with multipath Command

• Multipath Command Options

• Multipath Queries with dmsetup Command

• Troubleshooting with the multipathd Interactive Console

1. Multipath Command Output

When you create, modify, or list a multipath 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 of a multipath command might appear as follows:

mpath1 (3600d0230003228bc000339414edb8101) [size=10

GB][features="0"][hwhandler="0"]

\_ round-robin 0 [prio=1][active]

Chapter 5.

27

Summary of Contents for DEVICE-MAPPER MULTIPATH 4.6

Page 1: ...Using Device Mapper Multipath Configuration and Administration 4 6 DM_Multipath ISBN N A Publication date July 2008 ...

Page 2: ...This book provides information on using the Device Mapper Multipath feature of Red Hat Enterprise Linux 4 6 Using Device Mapper Multipath ...

Page 3: ...n 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 resp...

Page 4: ...Using Device Mapper Multipath ...

Page 5: ...Ignoring Local Disks when Generating Multipath Devices 12 3 Adding Devices to the Multipathing Database 14 4 The DM Multipath Configuration File 15 1 Configuration File Overview 15 2 Configuration File Blacklist 16 2 1 Blacklisting by WWID 16 2 2 Blacklisting By Device Name 17 3 Configuration File Defaults 17 4 Multipaths Device Configuration Attributes 20 5 Configuration File Devices 22 5 DM Mult...

Page 6: ...vi ...

Page 7: ...des detailed information suited for more experienced users to reference when needed as opposed to step by step instructions Red Hat Enterprise Linux Security Guide Details the planning and the tools involved in creating a secured computing environment for the data center workplace and home For more information about Red Hat Cluster Suite for Red Hat Enterprise Linux refer to the following resource...

Page 8: ...ifier rh MPIO EN 4 6 2008 07 31T15 20 By mentioning this manual s identifier we know exactly which version of the guide you have If you have a suggestion for improving the documentation try to be as specific as possible If you have found an error please include the section number and some of the surrounding text so we can find it easily 4 Document Conventions Certain words in this manual are repre...

Page 9: ... manual uses different strategies to draw your attention to pieces of information In order of how critical the information is to you these items are marked as follows Note A note is typically information that you need to understand the behavior of the system Tip A tip is typically an alternative way of performing a task Important Important information is necessary but possibly unexpected such as a...

Page 10: ...Warning A warning indicates potential data loss as may happen when tuning hardware for maximum performance Preface x ...

Page 11: ...ssive configuration In an active passive configuration only half the paths are used at any time for I O If any element of an I O path 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 loadi...

Page 12: ...n this configuration HBA failure FC cable failure SAN switch failure Array controller port failure With DM Multipath configured a failure at any of these points will cause DM Multipath to switch to the alternate I O path Figure 1 2 Active Passive Multipath Configuration with Two RAID Devices shows a more complex active passive configuration with 2 HBAs on the server 2 SAN switches and 2 RAID devic...

Page 13: ...er of the RAID devices will cause DM Multipath to switch to the alternate I O path for that device Figure 1 3 Active Active Multipath Configuration with One RAID Device shows an active active configuration with 2 HBAs on the server 1 SAN switch and 2 RAID controllers There are four I O paths from the server to a storage device hba1 to controller1 hba1 to controller2 hba2 to controller1 hba2 to con...

Page 14: ...ath conf For information on the DM Multipath configuration file see Chapter 4 The DM Multipath Configuration File Some storage arrays require special handling of I O errors and path switching These require separate hardware handler kernel modules 3 DM Multipath Components Table 1 1 DM Multipath Components describes the components of DM Multipath Component Description dm multipath kernel module Rer...

Page 15: ...ckage depends on it Table 1 1 DM Multipath Components 4 DM Multipath Setup Overview DM Multipath includes compiled in 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 f...

Page 16: ...6 ...

Page 17: ...f DM Multipath the new devices may be seen in three different places under the dev directory dev mapper mpathn dev mpath mpathn and dev dm n The devices in dev mapper are created early in the boot process Use these devices 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...

Page 18: ...ating an entry for that device in the multipaths section of the multipath configuration file For information on the multipaths section of the multipath configuration file see see Section 4 Multipaths Device Configuration Attributes 4 Multipath Devices in Logical Volumes After creating multipath devices you can use the multipath device names just as you would use a physical device name when creatin...

Page 19: ...filter r disk r sd a Multipath Devices in Logical Volumes 9 ...

Page 20: ...10 ...

Page 21: ...ts all devices You must comment it out to enable multipathing devnode_blacklist devnode After commenting out those lines this section appears as follows devnode_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...

Page 22: ... device to an alias of your choosing see Chapter 4 The DM Multipath Configuration File 2 Ignoring Local Disks when Generating Multipath Devices Some machines 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 whi...

Page 23: ...ice mapper from mapping dev sda in its multipath maps edit the devnode_blacklist section of the etc multipath conf file to include this device Although you could blacklist the sda device 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 outpu...

Page 24: ... 3 sdi 8 128 3 Adding Devices to the Multipathing Database 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...

Page 25: ...evices In the multipath configuration file you need to specify only the sections that you 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 t...

Page 26: ...nfiguration file devnode_blacklist devnode To enable multipathing on all of the devices that are supported by default comment out those lines as described in Section 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 Sect...

Page 27: ...tatically mapped by udev rules there is no guarantee that a specific device will have the same name on reboot For example a device name could change from dev sda to dev sdb on reboot By default the following devnode entries are compiled in the default blacklist the devices that these entires blacklist do not generally support DM Multipath blacklist devnode ram raw loop fd md dm sr scd st 0 9 devno...

Page 28: ... user_friendly_names yes path_grouping_policy multibus Table 4 1 Multipath Configuration Defaults describes the attributes that are set in the defaults section of the multipath conf configuration file These values are used by DM Multipath unless they are overwritten by the attributes specified in the devices and multipaths sections of the multipath conf file Attribute Description udev_dir Specifie...

Page 29: ... the state of the paths Possible values include readsector0 tur emc_clariion hp_sw and directio The default value is readsector0 rr_min_io Specifies the number of I O requests to route to a path before switching to the next path in the current path group The default value is 1000 rr_weight If set to priorities then instead of sending rr_min_io requests to a path before calling selector to choose t...

Page 30: ...ion file The default value is no bindings_file The location of the bindings file that is used with the user_friendly_names option The default value is var lib multipath bindings Table 4 1 Multipath Configuration Defaults 4 Multipaths Device Configuration Attributes Table 4 2 Multipath Attributes shows the attributes that you can set in the multipaths section of the multipath conf configuration fil...

Page 31: ...allout program Currently there are priority callouts only for devices that use the group_by_prio path grouping policy which means that all the paths 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 v...

Page 32: ...onf defaults file You probably will not need to modify the values for these devices but if you do you can overwrite the default values by including an entry in the the configuration file for the device that overwrites those values You can copy the device configuration defaults from the multipath conf defaults file for the device and override the values that you want to change To add a device to th...

Page 33: ... device to get blacklisted the vendor product and bl_product strings must all match path_grouping_policy Specifies the default path grouping policy to apply to unspecified multipaths Possible values include failover 1 path per priority group multibus all valid paths in 1 priority group group_by_serial 1 priority group per detected serial number group_by_prio 1 priority group per path priority valu...

Page 34: ...ath before calling selector to choose the next path the number of requests to send is determined by rr_min_io times the path s priority as determined by the prio_callout program Currently there are priority callouts only for devices that use the group_by_prio path grouping policy which means that all the paths in a path group will always have the same priority If set to uniform all path weights ar...

Page 35: ... path_checker tur rr_weight priorities Configuration File Devices 25 ...

Page 36: ...26 ...

Page 37: ...hen you create modify or list a multipath 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...

Page 38: ... ll options of the multipath command to display the current multipath configuration The l option displays multipath topology gathered 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 ...

Page 39: ...mand displays all the device mapper devices and their major and minor numbers The minor numbers determine the name of the dm device For example a minor number of 3 corresponds to the multipathed device dev dm 3 dmsetup ls mpath2 253 4 mpath4p1 253 12 mpath5p1 253 11 mpath1 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...

Page 40: ... command sequence displays the multipath configuration including the defaults before exiting the console multipathd k show config CTRL D 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 Chapter 5 D...

Page 41: ...cy parameter 18 20 23 path_selector parameter 20 23 polling interval parameter 18 prio_callout parameter 18 23 product parameter 23 rr_min_io parameter 18 20 rr_weight parameter 18 20 23 selector parameter 18 udev_dir parameter 18 user_friendly_names parameter 17 18 vendor parameter 23 wwid parameter 20 configuring DM Multipath 11 D defaults section multipath conf file 17 dev mapper directory 7 de...

Page 42: ...aults file 4 15 multipathd command 29 interactive console 29 multipathd daemon 4 multipathd start command 11 multipaths section multipath conf file 20 N no_path_retry parameter 18 20 23 P path_checker parameter 18 23 path_grouping_policy parameter 18 20 23 path_selector parameter 20 23 polling_interval parameter 18 prio_callout parameter 18 23 product parameter 23 R rr_min_io parameter 18 20 rr_we...

Reviews: