background image

x

Содержание DEVICE-MAPPER MULTIPATH 5.2

Страница 1: ...Using Device Mapper Multipath Configuration and Administration 5 2 DM_Multipath ISBN N A Publication date July 2008 ...

Страница 2: ...This book provides information on using the Device Mapper Multipath feature of Red Hat Enterprise Linux 5 2 Using Device Mapper Multipath ...

Страница 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...

Страница 4: ...Using Device Mapper Multipath ...

Страница 5: ...ting Multipath Devices 12 3 Adding Devices to the Multipathing Database 14 4 The DM Multipath Configuration File 17 1 Configuration File Overview 17 2 Configuration File Blacklist 18 2 1 Blacklisting by WWID 18 2 2 Blacklisting By Device Name 19 2 3 Blacklisting By Device Type 19 2 4 Blacklist Exceptions 20 3 Configuration File Defaults 20 4 Multipaths Device Configuration Attributes 23 5 Configur...

Страница 6: ...vi ...

Страница 7: ... of the Red Hat Cluster Suite Configuring and Managing a Red Hat Cluster Provides information about installing configuring and managing Red 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 Provi...

Страница 8: ...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 represented in different fonts styles and weights This highlighting indicates that the word is part of a specific category The categories include the following Courier font Courier font represents commands file names and paths and prompts When shown as below ...

Страница 9: ...arked 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 configuration change that will not persist after a reboot Caution A caution indicates an act that would violate your support agreement such as recomp...

Страница 10: ...x ...

Страница 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...

Страница 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...

Страница 13: ...ice 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 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...

Страница 14: ...red by default in this file you may need to add them to the DM Multipath configuration file multipath 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 Compon...

Страница 15: ...x is provided in its own package but the device mapper multipath package 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 de...

Страница 16: ...6 ...

Страница 17: ... of 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 ...

Страница 18: ...rmation 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 creating an LVM physical volume For example if dev mapper mpath0 is the name of a multipath device the follo...

Страница 19: ...Multipath Devices in Logical Volumes 9 ...

Страница 20: ...10 ...

Страница 21: ...e blacklists all devices You must comment 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 no...

Страница 22: ... the name of the 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...

Страница 23: ...ound robin 0 _ 2 0 0 3 sde 8 64 _ 3 0 0 3 sdi 8 128 2 In order to prevent the device mapper from mapping dev sda in its multipath maps edit the 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 devic...

Страница 24: ... 3600a0b80001327510000009b4362163e size 12 GB features 0 hwhandler 0 _ round robin 0 _ 2 0 0 3 sde 8 64 _ 3 0 0 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...

Страница 25: ...For more information on the devices section of the configuration file see Section 5 Configuration File Devices Multipath Devices 15 ...

Страница 26: ...16 ...

Страница 27: ...ion file devices 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 the...

Страница 28: ...sted will not be grouped into a multipath device By default all devices are blacklisted since the following lines appear in the initial configuration file 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 ty...

Страница 29: ...evices of specific type this is not recommended however Unless it is statically 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...

Страница 30: ... configuration file you must specify the exceptions in the same way they were specified in the blacklist For example a WWID exception will not apply to devices specified by a devnode blacklist entry even if the blacklisted device is associated with that WWID Similarly devnode exceptions apply only to devnode entries and device exceptions apply only to device entries 3 Configuration File Defaults T...

Страница 31: ...ation 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 Specifies the directory where udev device nodes are created The default value is udev polli...

Страница 32: ...d of sending rr_min_io requests to a path 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...

Страница 33: ...ecified multipath These defaults are used by DM Multipath and override attributes set in the defaults and devices sections of the multipath conf file Attribute Description wwid Specifies the WWID of the multipath device to which the multipath attributes apply alias Specifies the symbolic name for the multipath device to which the multipath attributes apply path_grouping_policy Specifies the defaul...

Страница 34: ...se 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 Specifies the number of I O requests to route to a path before switching to the next path in the current path group Table 4 2 Multipath Attributes The following example shows multipath attributes specified ...

Страница 35: ...cally by default you need to set the 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 spec...

Страница 36: ... path weight Weights are summed for each path group to determine the next path group to use in case of failue none is a valid value path_checker Specifies the default method used to determine the state of the paths Possible values include readsector0 and tur emc_clariion hp_sw and directio path_selector Specifies the default algorithm to use in determining what path to use for the next I O operati...

Страница 37: ...ath 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 The default value is uniform 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 queuing A value of q...

Страница 38: ...28 ...

Страница 39: ...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...

Страница 40: ... 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 ...

Страница 41: ...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...

Страница 42: ... 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...

Страница 43: ...r parameter 23 26 polling interval parameter 21 prio_callout parameter 21 26 product parameter 26 product_blacklist parameter 26 rr_min_io parameter 21 23 rr_weight parameter 21 23 26 selector parameter 21 udev_dir parameter 21 user_friendly_names parameter 20 21 vendor parameter 26 wwid parameter 23 configuring DM Multipath 11 D defaults section multipath conf file 20 dev mapper directory 7 dev m...

Страница 44: ... 4 17 multipathd command 31 interactive console 31 multipathd daemon 4 multipathd start command 12 multipaths section multipath conf file 23 N no_path_retry parameter 21 23 26 P path_checker parameter 21 26 path_grouping_policy parameter 21 23 26 path_selector parameter 23 26 polling_interval parameter 21 prio_callout parameter 21 26 product parameter 26 product_blacklist parameter 26 R rr_min_io ...

Отзывы: