Este conteúdo não está disponível no idioma selecionado.
Chapter 5. Modifying the DM Multipath configuration file
By default, DM Multipath provides configuration values for the most common uses of multipathing. In addition, DM Multipath includes support for the most common storage arrays that themselves support DM Multipath.
You can override the default configuration values for DM Multipath by editing the /etc/multipath.conf
configuration file. If necessary, you can also add an unsupported by default storage array to the configuration file. In the multipath configuration file, you need to specify only the sections that you need for your configuration, or that you need to change from the default values. 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.
In the configuration file, you can also use the regular expression.
If you run multipath from the initramfs
file system and you make any changes to the multipath configuration files, you must rebuild the initramfs
file system for the changes to take effect
5.1. Configuration file overview
The multipath configuration file is divided into the following sections:
- blacklist
- Listing of specific devices that will not be considered for multipath.
- blacklist_exceptions
-
Listing of multipath devices that would otherwise be ignored according to the parameters of the
blacklist
section. - defaults
- General default settings for DM Multipath.
- multipaths
-
Settings for the characteristics of individual multipath devices. These values overwrite what is specified in the
overrides
,devices
, anddefaults
sections of the configuration file. - devices
-
Settings for the individual storage controllers. These values overwrite what is specified in the
defaults
section of the configuration file. If you are using a storage array that is not supported by default, you may need to create adevices
subsection for your array. - overrides
-
Settings that are applied to all devices. These values overwrite what is specified in the
devices
anddefaults
sections of the configuration file.
When the system determines the attributes of a multipath device, it checks the settings of the separate sections from the multipath.conf
file in the following order:
-
multipaths
section -
overrides
section -
devices
section -
defaults
section
The following are the ways to view the default configurations:
If you install your machine on a multipath device, the default multipath configuration applies automatically. The default configuration includes the following:
-
For a complete list of the default configuration values, execute either
multipath -t
ormultipathd show config
command. -
For a list of configuration options with descriptions, see the
multipath.conf
man page on your system.
-
For a complete list of the default configuration values, execute either
-
If you did not set up multipathing during installation, execute the
mpathconf --enable
command to get the default configuration.
5.2. Configuration file defaults
The /etc/multipath.conf
configuration file contains a defaults
section. This section includes the default configuration of Device Mapper (DM) Multipath. The default values might differ based on your initial device settings.
The following table describes the optional attributes, set in the defaults
section of the multipath.conf
configuration file. If you do not set them, default values from the overrides
, or devices
sections apply.
Attribute | Description |
---|---|
|
Specifies the interval between two path checks in seconds. For properly functioning paths, the interval between checks gradually increases to |
| Specifies the maximum length of the interval between two path checks in seconds. |
The default value is | |
| Defines the mode for setting up multipath devices. Available values include: |
| |
| |
| |
| |
| |
The default value is | |
|
This represents the timeout in seconds, to wait for additional paths after detecting the first one, if |
Positive value: If set with a positive value, the timeout applies for all non-blacklisted devices. | |
Negative value: If set with a negative value, the timeout applies only to known devices that have an entry in the multipath hardware table, either in the built-in table, or in a | |
| |
The default value for known hardware is | |
|
Set the timeout of |
For systems with a large number of devices, | |
The default value is | |
|
Enable reassigning of device-mapper maps. With this option, the |
|
The default verbosity value is |
| Specifies the default algorithm to use in determining what path to use for the next I/O operation. Possible values include: |
| |
| |
| |
The default value is | |
| Specifies the default path grouping policy to apply to unspecified multipaths. Possible values include: |
| |
| |
| |
| |
| |
The default value is | |
|
Set this option to activate merging |
The value of this option is a space separated list of records like | |
If you configure this option and it matches the device node name of a device, it overrides any other configured methods for determining the WWID for this device. | |
You can enable | |
The default is | |
|
Specifies the default function to call to obtain a path priority value. For example, the ALUA bits in SPC-3 provide an exploitable |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
The default value depends on the | |
|
Arguments to pass to the |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
The default value is | |
| The default extra features of multipath devices, using the format: "number_of_features_plus_arguments feature1 …". |
Possible values for | |
| |
| |
| |
| |
By default, the value is unset. | |
| Specifies the default method to determine the state of the paths. Possible values include: |
| |
| |
| |
| |
| |
| |
| |
| |
The default value is | |
|
This attribute represents the |
The default value is | |
| Manages path group failback. Possible values include: |
| |
| |
| |
A numeric value greater than zero, specifies deferred failback, and is expressed in seconds. | |
The default value is | |
|
Specifies the number of I/O requests to route to a path before switching to the next path in the current path group. This setting is only for systems running kernels older than 2.6.31. Newer systems should use |
|
Specifies the number of I/O requests to route to a path, before switching to the next path in the current path group. Uses a request-based device-mapper-multipath. This setting can be used on systems running current kernels. On systems running kernels older than 2.6.31, use |
| A numeric value for this attribute specifies the number of times that the path checker must fail for all paths in a multipath device, before disabling queuing. |
A value of | |
A value of | |
The default value is | |
| Possible values include: |
| |
| |
The default value is | |
|
If set to |
|
If set to |
|
Sets the maximum number of open file descriptors that can be opened by multipath and the |
|
The timeout to use for prioritizers and path checkers that issue SCSI commands with an explicit timeout, in seconds. The |
|
The number of seconds the SCSI layer waits after a problem is detected on an FC remote port, before failing I/O to devices on that remote port. This value must be smaller than the value of |
| The number of seconds the SCSI layer waits after a problem is detected on an FC remote port, before removing it from the system. Setting this to infinity will set this to 2147483647 seconds, or 68 years. The OS determines the default value. |
|
Specifies the maximum number of seconds the SCSI layer spends performing error handling, when SCSI devices fail. After this timeout, the scsi layer performs a full HBA reset. Setting this is necessary in cases where the |
The default value is | |
|
If this is set to |
If | |
The default value is | |
|
Specifies the |
The default value is device dependent: | |
|
If set to |
The default value is | |
|
If set to |
The default value is | |
|
Use the |
The default value of | |
|
This attribute controls the number of seconds the |
The default value is | |
|
If set to |
|
If you set all three of these attributes to integers greater than zero, they enable the |
See the Shaky paths detection section of the | |
The default value is | |
|
If |
If a path fails twice within the value set in the | |
See the Shaky paths detection section of the | |
The default value is | |
| Possible values include: |
| |
| |
| |
The | |
See the Shaky paths detection section of the | |
The default value is | |
|
If set to |
|
If set to |
|
Using this option, you can set the |
|
This attribute sets the number of seconds that multipath waits after creating a device with only ghost paths, before marking it ready for use in |
Setting this to | |
The default value is | |
| This attribute enables or disables foreign libraries. |
The value is a regular expression. Foreign libraries are loaded if their name matches the expression. | |
By default, no foreign libraries are enabled. Use | |
|
If set to |
This option only works for SCSI devices with configuration to use the default | |
The default value is | |
|
This option sets the number of times multipath retries removing a device that is in use. Between each attempt, multipath becomes inactive for 1 second. The default value is |
|
If set to |
The default value is | |
|
The |
This parameter can also be set to | |
|
If this option is set to |
|
Controls when the |
| |
| |
|
Additional resources
-
multipath.conf(5)
man page on your system
5.3. Modifying multipath configuration file defaults
The default values that are set in the defaults section on the multipath.conf file
, are used by DM Multipath unless they are overwritten by the attributes specified in the devices, multipath, or overrides sections of the multipath.conf
file.
Procedure
View the
/etc/multipath.conf
configuration file, which includes a template of configuration defaults:#defaults { # polling_interval 10 # path_selector "round-robin 0" # path_grouping_policy multibus # uid_attribute ID_SERIAL # prio alua # path_checker readsector0 # rr_min_io 100 # max_fds 8192 # rr_weight priorities # failback immediate # no_path_retry fail # user_friendly_names yes #}
Overwrite the default value for any of the configuration parameters. You can copy the relevant line from this template into the
defaults
section and uncomment it.For example, to overwrite the
path_grouping_policy
parameter tomultibus
instead of the default value offailover
, copy the appropriate line from the template to the initial defaults section of the configuration file, and uncomment it, as follows:defaults { user_friendly_names yes path_grouping_policy multibus }
Validate the
/etc/multipath.conf
file after modifying the multipath configuration file by running one of the following commands:To display any configuration errors, run:
# multipath -t > /dev/null
To display the new configuration with the changes added, run:
# multipath -t
Reload the
/etc/multipath.conf
file and reconfigure themultipathd
daemon for changes to take effect:# service multipathd reload
Additional resources
-
multipath.conf(5)
andmultipathd(8)
man pages on your system
5.4. Configuration file multipaths section
Set attributes of individual multipath devices by using the multipaths
section of the /etc/multipath.conf
configuration file. Device Mapper (DM) Multipath uses these attributes to override all other configuration settings, including those from the overrides
section.
The multipaths
section recognizes only the multipath
subsection as an attribute. The following table shows the attributes that you can set in the multipath
subsection, for each specific multipath device. These attributes apply only to one specified multipath. If several multipath
subsections match a specific device World Wide Identifier (WWID), the contents of those subsections merge. The settings from latest entries have priority over any previous versions.
Attribute | Description |
---|---|
|
Specifies the WWID of the multipath device, to which the multipath attributes apply. This parameter is mandatory for this section of the |
|
Specifies the symbolic name for the multipath device, to which the multipath attributes apply. If you are using |
The following example shows multipath attributes specified in the configuration file for two specific multipath devices. The first device has a WWID of 3600508b4000156d70001200000b0000
and a symbolic name of yellow
.
The second multipath device in the example has a WWID of 1DEC_321816758474
and a symbolic name of red
.
Example 5.1. Multipath attributes specification
multipaths {
multipath {
wwid 3600508b4000156d70001200000b0000
alias yellow
path_grouping_policy multibus
path_selector "round-robin 0"
failback manual
no_path_retry 5
}
multipath {
wwid 1DEC_321816758474
alias red
}
}
Additional resources
-
multipath.conf(5)
man page on your system - Configuration file defaults
- Configuration file overrides section
5.5. Configuration file devices section
Use the devices
section of the multipath.conf
configuration file to define settings for individual storage controller types. Values set in this section overwrite specified values in the defaults
section.
The system identifies the storage controller types by the vendor
, product
, and revision
keywords. These keywords are regular expressions and must match the sysfs
information about the specific device.
The devices
section recognizes only the device
subsection as an attribute. If there are multiple keyword matches for a device, the attributes of all matching entries apply to it. If an attribute is specified in several matching device
subsections, later versions of entries have priority over any previous entries.
Configuration attributes in the latest version of the device
subsections override attributes in any previous devices
subsections and from the defaults
section.
The following table shows the attributes that you can set in the device
subsection.
Attribute | Description |
---|---|
| Specifies the regular expression to match the device vendor name. This is a mandatory attribute. |
| Specifies the regular expression to match the device product name. This is a mandatory attribute. |
| Specifies the regular expression to match the device product revision. If the revision attribute is missing, all device revisions match. |
|
Multipath uses this attribute to create a device |
| Shows the vendor specific Vital Product Data (VPD) page information, using the VPD page abbreviation. |
The | |
| Specifies the hardware handler to use for a particular device type. All possible values are hardware dependent and include: |
| |
| |
| |
| |
| |
The default value is |
Linux kernels, versions 4.3 and newer, automatically attach a device handler to known devices. This includes all devices supporting SCSI-3 ALUA). The kernel does not enable changing the handler later on. Setting the hardware_handler attribute for such devices on these kernels takes no effect.
Additional resources
-
multipath.conf(5)
man page on your system - Configuration file defaults
5.6. Configuration file overrides section
The overrides
section recognizes the optional protocol
subsection, and can contain multiple protocol
subsections. The system matches path devices against the protocol
subsection, using the mandatory type
attribute. Attributes in a matching protocol
subsection have priority over attributes in the rest of the overrides
section. If there are multiple matching protocol
subsections, later entries have higher priority.
The protocol
subsection recognizes the following mandatory attribute:
Attribute | Description |
---|---|
| Specifies the protocol string of the path device. Possible values include: |
| |
This attribute is not a regular expression. The path device protocol string must match exactly. |
The attributes in the following list are optional for the protocol
subsection. If you do not set them, default values from the overrides
, devices
or defaults
sections apply.
-
fast_io_fail_tmo
-
dev_loss_tmo
-
eh_deadline
Additional resources
-
multipath.conf(5)
man page on your system - Configuration file defaults
5.7. DM Multipath overrides of the device timeout
The recovery_tmo
sysfs
option controls the timeout for a particular iSCSI device. The following options globally override the recovery_tmo
values:
-
The
replacement_timeout
configuration option globally overrides therecovery_tmo
value for all iSCSI devices. For all iSCSI devices that are managed by DM Multipath, the
fast_io_fail_tmo
option in DM Multipath globally overrides therecovery_tmo
value.The
fast_io_fail_tmo
option in DM Multipath also overrides thefast_io_fail_tmo
option in Fibre Channel devices.
The DM Multipath fast_io_fail_tmo
option takes precedence over replacement_timeout
. Red Hat does not recommend using replacement_timeout
to override recovery_tmo
in devices managed by DM Multipath because DM Multipath always resets recovery_tmo
, when the multipathd
service reloads.
5.8. Modifying multipath settings for specific devices
In the multipaths
section of the multipath.conf
configuration file, you can add configurations that are specific to an individual multipath device, referenced by the mandatory WWID parameter.
These defaults are used by DM Multipath and override attributes set in the overrides
, defaults
, and devices
sections of the multipath.conf
file. There can be any number of multipath subsections in the multipaths
section.
Procedure
Modify the
multipaths
section for specific multipath device. The following example shows multipath attributes specified in the configuration file for two specific multipath devices:-
The first device has a WWID of
3600508b4000156d70001200000b0000
and a symbolic name ofyellow
. -
The second multipath device in the example has a WWID of
1DEC_321816758474
and a symbolic name ofred
.
In this example, the
rr_weight
attribute is set topriorities
.multipaths { multipath { wwid 3600508b4000156d70001200000b0000 alias yellow path_grouping_policy multibus path_selector "round-robin 0" failback manual rr_weight priorities no_path_retry 5 } multipath { wwid 1DEC_321816758474 alias red rr_weight priorities } }
-
The first device has a WWID of
Validate the
/etc/multipath.conf
file after modifying the multipath configuration file by running one of the following commands:To display any configuration errors, run:
# multipath -t > /dev/null
To display the new configuration with the changes added, run:
# multipath -t
Reload the
/etc/multipath.conf
file and reconfigure themultipathd
daemon for changes to take effect:# service multipathd reload
Additional resources
-
multipath.conf(5)
man page on your system
5.9. Modifying the multipath configuration for specific devices with protocol
You can configure multipath device paths, based on their transport protocol. By using the protocol
subsection of the overrides
section in the /etc/multipath.conf
file, you can override the multipath configuration settings on certain paths. This enables access to multipath devices over multiple transport protocols, like Fiber Channel (FC) or Internet Small Computer Systems Interface (iSCSI).
Options set in the protocol
subsection override values in the overrides
, devices
and defaults
sections. These options apply only to devices using a transport protocol which matches the type
parameter of the subsection.
Prerequisites
- You have configured Device Mapper (DM) multipath in your system.
- You have multipath devices where not all paths use the same transport protocol.
Procedure
View the specific path protocol by running the following:
# multipathd show paths format "%d %P" dev protocol sda scsi:ata sdb scsi:fcp sdc scsi:fcp
Edit the
overrides
section of the/etc/multipath.conf
file, by addingprotocol
subsections for each multipath type.The
overrides
section can include multipleprotocol
subsections.ImportantThe
protocol
subsection must include atype
parameter. The configuration of all paths with a matchingtype
parameter is then updated with the rest of the parameters listed in theprotocol
subsection.Settings for path devices, which use the
scsi:fcp
protocol:overrides { dev_loss_tmo 60 fast_io_fail_tmo 8 protocol { type "scsi:fcp" dev_loss_tmo 70 fast_io_fail_tmo 10 eh_deadline 360 } }
Settings for path devices, which use the
scsi:iscsi
protocol:overrides { dev_loss_tmo 60 fast_io_fail_tmo 8 protocol { type "scsi:iscsi" dev_loss_tmo 60 fast_io_fail_tmo 120 } }
Settings for path devices, which use all other protocols:
overrides { dev_loss_tmo 60 fast_io_fail_tmo 8 protocol { type "<type of protocol>" dev_loss_tmo 60 fast_io_fail_tmo 8 } }
Additional resources
-
multipath.conf(5)
man page
5.10. Modifying multipath settings for storage controllers
The devices
section of the multipath.conf
configuration file sets attributes for individual storage devices. These attributes are used by DM Multipath unless they are overwritten by the attributes specified in the multipaths
or overrides
sections of the multipath.conf
file for paths that contain the device. These attributes override the attributes set in the defaults
section of the multipath.conf
file.
Procedure
View the information about the default configuration value, including supported devices:
# multipathd show config # multipath -t
Many devices that support multipathing are included by default in a multipath configuration.
-
Optional: If you need to modify the default configuration values, you can overwrite the default values by including an entry in the configuration file for the device that overwrites those values. You can copy the device configuration defaults for the device that the
multipathd show config
command displays and override the values that you want to change. Add a device that is not configured automatically by default to the
devices
section of the configuration file by setting thevendor
andproduct
parameters. Find these values by opening the/sys/block/device_name/device/vendor
and/sys/block/device_name/device/model
files where device_name is the device to be multipathed, as mentioned in the following example:# cat /sys/block/sda/device/vendor WINSYS # cat /sys/block/sda/device/model SF2372
Optional: Specify the additional parameters depending on your specific device:
active/active
device-
Usually there is no need to set additional parameters in this case. If required, you might set
path_grouping_policy
tomultibus
. Other parameters you may need to set areno_path_retry
andrr_min_io
. active/passive
device-
If it automatically switches paths with I/O to the passive path, you need to change the checker function to one that does not send I/O to the path to test if it is working, otherwise, your device will keep failing over. This means that you have set the
path_checker
totur
, which works for all SCSI devices that support the Test Unit Ready command, which most do.
If the device needs a special command to switch paths, then configuring this device for multipath requires a hardware handler kernel module. The current available hardware handler is
emc
. If this is not sufficient for your device, you might not be able to configure the device for multipath.The following example shows a
device
entry in the multipath configuration file:# } # device { # vendor "COMPAQ " # product "MSA1000 " # path_grouping_policy multibus # path_checker tur # rr_weight priorities # } #}
Validate the
/etc/multipath.conf
file after modifying the multipath configuration file by running one of the following commands:To display any configuration errors, run:
# multipath -t > /dev/null
To display the new configuration with the changes added, run:
# multipath -t
Reload the
/etc/multipath.conf
file and reconfigure themultipathd
daemon for changes to take effect:# service multipathd reload
Additional resources
-
multipath.conf(5)
andmultipathd(8)
man pages on your system
5.11. Setting multipath values for all devices
Using the overrides
section of the multipath.conf
configuration file, you can set a configuration value for all of your devices. This section supports all attributes that are supported by both the devices
and defaults
section of the multipath.conf
configuration file, which is all of the devices
section attributes except vendor
, product
, and revision
.
DM Multipath uses these attributes for all devices unless they are overwritten by the attributes specified in the multipaths
section of the multipath.conf
file for paths that contain the device. These attributes override the attributes set in the devices
and defaults
sections of the multipath.conf
file.
Procedure
Override device specific settings. For example, you might want all devices to set
no_path_retry
tofail
. Use the following command to turn off queueing, when all paths have failed. This overrides any device specific settings.overrides { no_path_retry fail }
Validate the
/etc/multipath.conf
file after modifying the multipath configuration file by running one of the following commands:To display any configuration errors, run:
# multipath -t > /dev/null
To display the new configuration with the changes added, run:
# multipath -t
Reload the
/etc/multipath.conf
file and reconfigure themultipathd
daemon for changes to take effect:# service multipathd reload
Additional resources
-
multipath.conf(5)
man page on your system