Ricerca

Questo contenuto non è disponibile nella lingua selezionata.

Chapter 5. Modifying the DM Multipath configuration file

download PDF

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.

For information about the default configuration values, including supported devices, run either of the following commands:

# multipathd show config
# multipath -t
Note

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

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.

The configuration file allows regular expression description syntax.

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, and defaults 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 a devices subsection for your array.
overrides
Settings that are applied to all devices. These values overwrite what is specified in the devices and defaults 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:

  1. multipaths section
  2. overrides section
  3. devices section
  4. defaults section

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 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 or multipathd show config command.
    • For a list of configuration options with descriptions, see the multipath.conf man page.
  • If you did not set up multipathing during installation, execute the mpathconf --enable command to get the default configuration.

The following table describes the attributes, set in the defaults section of the multipath.conf configuration file. Attributes specified in the multipaths section have higher priority over values in the devices section. Attributes specified in the devices section have higher priority over the default values. Use the overrides section to set attribute values for all device types, even if those device types have a builtin configuration entry in the devices section. The overrides section has no mandatory attributes. However, any attribute set in this section takes precedence over values in the devices or defaults sections.

Table 5.1. Multipath configuration defaults
AttributeDescription

polling_interval

Specifies the interval between two path checks in seconds. For properly functioning paths, the interval between checks gradually increases to max_polling_interval. The default value is 5.

max_polling_interval

Specifies the maximum length of the interval between two path checks in seconds.

The default value is 4 * polling_interval.

find_multipaths

Defines the mode for setting up multipath devices. Available values include:

no: If find_multipaths is set to no, multipath applies rules as with the strict value and the multipathd daemon applies rules as with the greedy value.

yes: If there are at least two devices that are not on the blacklist with the same World Wide Identifier (WWID), or if multipath created a multipath device with a device WWID before (even if that multipath device is no longer present), then the device is treated as a multipath device path.

greedy: Both multipathd and multipath treat every non-blacklisted device as a multipath device path.

smart: Multipath automatically considers that every non-blacklisted device is a multipath device path. If a second path, with the same WWID does not appear within the time set for find_multipaths_timeout, multipath releases the device and enables it for use by the rest of the system. The multipathd daemon applies rules as with the yes value.

strict: This value only treats a device as a multipath path, if you create a multipath device with the device WWID.

The default value is off. The default multipath.conf file sets find_multipaths to yes.

find_multipaths_timeout

This represents the timeout in seconds, to wait for additional paths after detecting the first one, if find_multipaths smart is set. Possible values include:

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 device section. Other unknown devices use a timeout of only 1 second to avoid booting delays.

0: The system applies the built-in default for this attribute.

The default value for known hardware is -10. This means that known devices have a 10 second timeout. Unknown devices have a 1 second timeout. If the find_multipaths attribute has a value other than smart, this attribute has no effect.

uxsock_timeout

Set the timeout of multipathd interactive commands in milliseconds.

For systems with a large number of devices, multipathd interactive commands might timeout and fail. If this happens, increase this timeout to resolve the issue.

The default value is 4000.

reassign_maps

Enable reassigning of device-mapper maps. With this option, the multipathd daemon remaps existing device-mapper maps to always point to the multipath device, not the underlying block devices. Possible values are yes and no. The default value is no.

verbosity

The default verbosity value is 2. Higher values increase the verbosity level. Valid levels are between 0 and 4.

path_selector

Specifies the default algorithm to use in determining what path to use for the next I/O operation. Possible values include:

round-robin 0: Loop through every path in the path group, sending the same number of I/O requests, determined by rr_min_io or rr_min_io_rq, to each.

queue-length 0: Send the next group of I/O requests down the path with the least number of outstanding I/O requests.

service-time 0: Send the next group of I/O requests down the path with the shortest estimated service time. This is determined by dividing the total size of the outstanding I/O to each path by the relative throughput.

The default value is service-time 0.

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 value. Priorities are determined by the prio attribute.

group_by_node_name: 1 priority group per target node name. The /sys/class/fc_transport/target*/node_name directory includes target node names.

The default value is failover.

uid_attrs

Set this option to activate merging uevents by WWID. This action might improve uevent processing efficiency. It is also an alternative method to configure the udev properties to use for determining unique path identifiers (WWIDs).

The value of this option is a space separated list of records like type:ATTR, where type is matched against the beginning of the device node name, and ATTR is the name of the udev property to use for matching devices.

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 uevent merging by setting this value to sd:ID_SERIAL dasd:ID_UID nvme:ID_WWN.

The default is unset.

prio

Specifies the default function to call to obtain a path priority value. For example, the ALUA bits in SPC-3 provide an exploitable prio value. Possible values include:

const: Set a priority of 1 to all paths.

emc: Generate the path priority for EMC arrays.

sysfs: Generate the path priority from sysfs. This prioritizer accepts the optional prio_arg value exclusive_pref_bit. The sysfs value uses the sysfs attributes access_state and preferred_path.

alua: Generate the path priority based on the SCSI-3 ALUA settings. If you specify prio alua and prio_args exclusive_pref_bit in your device configuration, multipath creates a path group that contains only the path with the exclusive_pref_bit set, and assigns that path group the highest priority. Refer to the multipath.conf(5) man page for more information about this type of cases.

ontap: Generate the path priority for NetApp arrays.

rdac: Generate the path priority for LSI/Engenio RDAC controller.

hp_sw: Generate the path priority for Compaq/HP controller in active/standby mode.

hds: Generate the path priority for Hitachi HDS Modular storage arrays.

random: Generate a random priority between 1 and 10.

weightedpath: Generate the path priority based on the regular expression and the provided priority as an argument. Requires a prio_args keyword.

path_latency: Generate the path priority based on a latency algorithm. Requires a prio_args keyword.

ana: Generate the path priority based on the NVMe ANA settings. This priority routine is hardware dependent.

datacore: Generate the path priority for some DataCore storage arrays. Requires a prio_args keyword. This priority routine is hardware dependent.

iet: Generate path priority for iSCSI targets based on IP their address. Requires a prio_args keyword. This priority routine is available only with iSCSI.

The default value depends on the detect_prio setting. If detect_prio is set to yes, then the default priority algorithm is sysfs. The only exception is for NetAPP E-Series, where the default is alua. If detect_prio is set to no, the default priority algorithm is const.

prio_args

Arguments to pass to the prio function. This applies only to the following prioritizers:

weighted: Needs a value of the form <hbtl,devname,serial,wwn> <regex1> <prio1> <regex2> <prio2>

hbtl: The Regex value can be of SCSI H:B:T:L format. For example: 1:0:.:. , *:0:0:.

devname: The Regex value can be in device name format. For example: sda, sd.e.

serial: The Regex value can be in serial number format. Look up serial through sysfs, or by running the command multipathd show paths format "%z".

wwn: The Regex value can be in the form host_wwnn:host_wwpn:target_wwnn:target_wwpn. These values can be looked up through sysfs or by running the command multipathd show paths format %N:%R:%n:%r".

path_latency: Requires a value in the form io_num= <integer> base_num=<integer>.

io_num: The number of read IOs, continuously sent to the current path. This value helps calculate the average path latency. Valid values include Integer, [2, 200].

base_num: The base number value of logarithmic scale. This value helps to partition different priority ranks. Valid values include Integer, [2, 10]. The maximum average latency value is 100s and the minimum average latency value is 1us.

alua: If the exclusive_pref_bit value is set, paths with the preferred_path_bit set always create their own path group.

sysfs: If the exclusive_pref_bit value is set, paths with the preferred_path_bit set always create their own path group.

datacore: Requires a value of the form timeout=<milliseconds> preferredsds=<name>.

preferredsds: This value is mandatory and it represents the preferred SDS name.

timeout: This value is optional. Set the timeout for the inquiry in milliseconds.

iet: Requires a value of the form preferredip=<ip_address>.

preferredip: This value is mandatory. This is the preferred IP address, in dotted decimal notation, for iSCSI targets.

The default value is unset.

features

The default extra features of multipath devices, using the format: "number_of_features_plus_arguments feature1 …​".

Possible values for features include:

queue_if_no_path: The same as setting no_path_retry to queue.

pg_init_retries n: Retry path group initialization up to n times before failing. The number must be between 1 and 50.

pg_init_delay_msecs msecs: Number of milliseconds before pg_init retry initiates. The number must be between 0 and 60000.

queue_mode mode: Select the queueing mode per multipath device. The mode value options are bio, rq or mq. These correspond to bio-based, request-based, and block-multiqueue request-based (blk-mq), respectively.

By default, the value is unset. The default can also depend on the kernel parameter dm_mod.use_blk_mq. The two options are mq if it is already set in the parameter, or rq otherwise.

path_checker

Specifies the default method to determine the state of the paths. Possible values include:

readsector0: Read the first sector of the device.

tur: Issue a TEST UNIT READY command to the device.

emc_clariion: Query the EMC Clariion specific EVPD page 0xC0 to determine the path.

hp_sw: Check the path state for HP storage arrays with Active/Standby firmware.

rdac: Check the path state for LSI/Engenio RDAC storage controller.

directio: Read the first sector with direct I/O.

cciss_tur: Check the path state for HP/COMPAQ Smart Array(CCISS) controllers. This is hardware dependent.

none: Does not check the device. Falls back to use values retrieved from sysfs.

The default value is tur.

alias_prefix

This attribute represents the user_friendly_names prefix.

The default value is mpath.

failback

Manages path group failback. Possible values include:

immediate: Specifies immediate failback to the highest priority path group that contains active paths.

manual: Specifies that there is no immediate failback, but that failback can happen only with operator intervention.

followover: Specifies that automatic failback can only be performed when the first path of a path group becomes active. This keeps a node from automatically failing back, when another node requested the failover.

A numeric value greater than zero, specifies deferred failback, and is expressed in seconds.

The default value is manual.

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. This setting is only for systems running kernels older than 2.6.31. Newer systems should use rr_min_io_rq. The default value is 1000.

rr_min_io_rq

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 rr_min_io. The default value is 1.

no_path_retry

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 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 fail.

user_friendly_names

Possible values include:

yes: Specifies that the system can use the /etc/multipath/bindings file to assign a persistent and unique alias to the multipath, in the form of mpath<n>.

no: The system uses the WWID as the alias for the multipath. Any device-specific alias you set in the multipaths section of the configuration file, overrides this name.

The default value is no.

queue_without_daemon

If set to no, the multipathd daemon disables queuing for all devices, when it is shut down. The default value is no.

flush_on_last_del

If set to yes, the multipathd daemon disables queuing when the last path to a device is deleted. The default value is no.

max_fds

Sets the maximum number of open file descriptors that can be opened by multipath and the multipathd daemon. This is equivalent to the ulimit -n command. The default value is max, which sets this to the system limit from /proc/sys/fs/nr_open.

checker_timeout

The timeout to use for prioritizers and path checkers that issue SCSI commands with an explicit timeout, in seconds. The sys/block/sd<x>/device/timeout directory contains the default value.

fast_io_fail_tmo

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 dev_loss_tmo. Setting this to off disables the timeout. The default value is 5. The fast_io_fail_tmo option overrides the values of the recovery_tmo and replacement_timeout options of the underlying path devices.

dev_loss_tmo

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.

eh_deadline

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 rport is never lost, so fast_io_fail_tmo and dev_loss_tmo never trigger, but scsi commands still hang. When the SCSI error handler performs the HBA reset, this affects all target paths on that HBA. The eh_deadline value should only be set in cases where all targets on the affected HBAs are multipathed.

The default value is unset.

detect_prio

If this is set to yes, multipath detects if the device is a SCSI device that supports Asymmetric Logical Unit Access (ALUA), or a NVMe device that supports Asymmetric Namespace Access (ANA). If the device supports ALUA, multipath automatically assigns it the alua prioritizer. If the device supports ANA, multipath automatically assigns it the ana prioritizer.

If detect_prio is set to no, or if the device does not support ALUA or ANA, the prio attribute sets the prioritizer.

The default value is yes.

uid_attribute

Specifies the udev attribute to use for the device WWID.

The default value is device dependent: ID_SERIAL for SCSI devices, ID_UID for DASD devices, and ID_WWN for NVMe devices.

force_sync

If set to yes, this parameter prevents path checkers from running in async mode. This means that only one checker runs at a time. This is useful in cases where many multipathd checkers run in parallel, and can cause significant CPU pressure.

The default value is no.

strict_timing

If set to yes, the multipathd daemon starts a new path checker loop after exactly one second, so that each path check occurs at the exactly set seconds for polling_interval. On busy systems, path checks might take longer than one second. The missing ticks are accounted for in the next round. A warning prints if path checks take longer than the set seconds for polling_interval.

The default value is no.

retrigger_tries, retrigger_delay

Use the retrigger_tries and retrigger_delay parameters in conjunction to make multipathd retrigger uevents. If udev fails to completely process the original uevents, this leaves multipath unable to use the device. The retrigger_tries parameter sets the number of times that multipath tries to retrigger a uevent, in case a device is not completely set up. The retrigger_delay parameter sets the number of seconds between retries. Both of these options accept numbers greater than or equal to 0. Setting the retrigger_tries parameter to 0 disables retries. Setting the retrigger_delay parameter to 0 causes the uevent to be reissued on the next loop of the path checker.

The default value of retrigger_tries is 3. The default value of retrigger_delay is 10.

missing_uev_wait_timeout

This attribute controls the number of seconds the multipathd daemon waits to receive a change event from udev for a newly created multipath device. After that it automatically enables device reloads. In most cases, multipathd delays reloads on a device, until it receives a change uevent from the initial table load.

The default value is 30.

deferred_remove

If set to yes, multipathd performs a deferred remove, instead of a regular remove, when the last path device is deleted. This ensures that if a multipathed device is in use when a regular remove is performed and the remove fails, the device is automatically removed, when the last user closes the device. The default value is no.

san_path_err_threshold, san_path_err_forget_rate, san_path_err_recovery_time

If you set all three of these attributes to integers greater than zero, they enable the multipathd daemon to keep shaky paths from reinstating, by monitoring how frequently the path checker fails. If a path checker fails a path more than the value in the san_path_err_threshold attribute, within san_path_err_forget_rate checks, then the multipathd daemon does not reinstate the path until the value of the san_path_err_recovery_time attribute in seconds passes, without any path checker failures.

See the Shaky paths detection section of the multipath.conf(5) for more information.

The default value is no.

marginal_path_double_failed_time, marginal_path_err_sample_time, marginal_path_err_rate_threshold, marginal_path_err_recheck_gap_time

If marginal_path_double_failed_time, marginal_path_err_rate_threshold, and marginal_path_err_recheck_gap_time are set to integers greater than 0 and marginal_path_err_sample_time is set to an integer greater than 120, they enable the multipathd daemon to keep shaky paths from reinstating, by testing the I/O failure rate of paths that repeatedly fail.

If a path fails twice within the value set in the marginal_path_double_failed_time attribute in seconds, the multipathd daemon does not immediately reinstate it, when the path checker determines that it is back up. Instead, multipathd issues a steady stream of read I/Os to the path for the value set in the marginal_path_err_sample_time attribute in seconds. If there are more than the value set in the marginal_path_err_rate_threshold attribute number of errors per thousand I/Os, multipathd waits for marginal_path_err_recheck_gap_time seconds, and then starts another cycle of testing the path with read I/Os. Otherwise, multipathd reinstates the path.

See the Shaky paths detection section of the multipath.conf(5) for more information.

The default value is no.

marginal_pathgroups

Possible values include:

on: When one of the marginal path detecting methods determines that a path is marginal, the system reinstates the path and places it in a separate pathgroup. This group comes into effect only after all the non-marginal path groups are tried first. This prevents the possibility of IO errors occurring while the system can still use some marginal paths. The path returns to a regular path group as soon as it passes monitoring for a configured time.

off: The delay_*_checks, marginal_path_*, and san_path_err_* attributes keep the system from reinstating any marginal, or shaky paths, until they are monitored for a configured time.

fpin: The multipathd daemon receives fpin notifications, sets path states to marginal, and regroups paths, as described for the on value.

The marginal_path_* and san_path_err_* attributes are implicitly set to no.

See the Shaky paths detection section of the multipath.conf(5) for more information.

The default value is no.

log_checker_err

If set to once, multipathd logs the first path checker error at verbosity level 2. The system logs any further errors at verbosity level 3, until the device is restored. If the log_checker_err parameter is set to always, multipathd always logs the path checker error at verbosity level 2. The default value is always.

skip_kpartx

If set to yes, kpartx does not automatically create partitions on the device. This enables you to create a multipath device, without creating partitions, even if the device has a partition table. The default value of this option is no.

max_sectors_kb

Using this option, you can set the max_sectors_kb device queue parameter to the specified value on all underlying paths of a multipath device, before the first activation of a multipath device. Whenever the system creates a new multipath device, the device inherits the max_sectors_kb value from the path devices. Manually raising this value for the multipath device, or lowering this value for the path devices, can cause multipath to create I/O operations larger than the path devices allow. Using the max_sectors_kb parameter is an easy way to set these values, before the creation of a multipath device on top of the path devices, and prevent passing any invalid-sized I/O operations. If you do not set this parameter, the path devices driver sets it automatically, and the multipath device inherits it from the path devices.

ghost_delay

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 systemd. This gives the active paths time to appear before the multipath runs the hardware handler to switch the ghost paths to active ones.

Setting this to 0 or no makes multipath immediately mark a device with only ghost paths as ready.

The default value is no.

enable_foreign

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, all libraries are enabled. However, the default configuration file also sets this attribute to "^$", which disables all foreign libraries.

recheck_wwid

If set to yes, when a failed path is restored, the multipathd daemon rechecks the path WWID. If there is a change in the WWID, the path is removed from the current multipath device, and added again as a new path. The multipathd daemon also checks the path WWID again if it is manually re-added.

This option only works for SCSI devices with configuration to use the default uid_attribute, ID_SERIAL, or sysfs, for getting their WWID.

The default value is no.

remove_retries

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 0, which means that multipath does not retry the remove.

detect_checker

If set to yes, multipath checks if the device supports ALUA or Redundant Disk Array Controller (RDAC). If the device supports ALUA, multipath assigns it the tur path_checker. If the device supports RDAC, the multipathd daemon assigns it the rdac path_checker. If the device does not support ALUA or RDAC, or the detect_checker is set to no, the path_checker attribute sets the path checker.

The default value is yes.

reservation_key

The mpathpersist parameter uses this service action reservation key. It must be set for all multipath devices using persistent reservations, and it must be the same as the RESERVATION KEY field of the PERSISTENT RESERVE OUT parameter list, which contains an 8-byte value provided by the application client to the device server to identify the I_T nexus. If you use the --param-aptpl option when registering the key with mpathpersist, you must append :aptpl to the end of the reservation key.

This parameter can also be set to file, which causes mpathpersist to automatically store the RESERVATION KEY used to register the multipath device in the prkeys file. The multipathd daemon then uses this key to register additional paths as they appear. When you remove the registration, this automatically removes the RESERVATION KEY from the prkeys file. It is unset by default. If persistent reservations are necessary, it is recommended to set this attribute to file.

all_tg_pt

If this option is set to yes when mpathpersist registers keys, it treats a registered key from one host to one target port, as going from one host to all target ports. This must be set to yes to successfully use mpathpersist on arrays that automatically set and clear registration keys on all target ports from a host, instead of per target port per host. The default value is no.

Additional resources

  • multipath.conf(5) man page

5.3. Configuration file multipaths section

Set attributes of individual multipath devices by using the multipaths section of the multipath.conf configuration file. Device Mapper (DM) Multipath uses these attributes to override all other configuration settings, including those from the overrides section. Refer to Configuration file overrides section for a list of attributes 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.

Table 5.2. Multipath subsection attributes
AttributeDescription

wwid

Specifies the WWID of the multipath device, to which the multipath attributes apply. This parameter is mandatory for this section of the multipath.conf file.

alias

Specifies the symbolic name for the multipath device, to which the multipath attributes apply. If you are using user_friendly_names, do not set this value to mpath <n>. This might cause conflicts with an automatically assigned user friendly name, and give you incorrect device node names.

The attributes in the following list are optional. If you do not set them, default values from the overrides, devices, or defaults sections apply. Refer to Configuration file defaults for a full description of these attributes.

  • path_grouping_policy
  • path_selector
  • prio
  • prio_args
  • failback
  • no_path_retry
  • rr_min_io
  • rr_min_io_rq
  • flush_on_last_del
  • features
  • reservation_key
  • user_friendly_names
  • deferred_remove
  • san_path_err_threshold
  • san_path_err_forget_rate
  • san_path_err_recovery_time
  • marginal_path_err_sample_time
  • marginal_path_err_rate_threshold
  • marginal_path_err_recheck_gap_time
  • marginal_path_double_failed_time
  • delay_watch_checks
  • delay_wait_checks
  • skip_kpartx
  • max_sectors_kb
  • ghost_delay

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

5.4. 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.

Important

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.

Table 5.3. Devices section attributes
AttributeDescription

vendor

Specifies the regular expression to match the device vendor name. This is a mandatory attribute.

product

Specifies the regular expression to match the device product name. This is a mandatory attribute.

revision

Specifies the regular expression to match the device product revision. If the revision attribute is missing, all device revisions match.

product_blacklist

Multipath uses this attribute to create a device blacklist entry that has a vendor attribute that matches the vendor attribute of this device entry, and a product attribute that matches this product_blacklist attribute.

vpd_vendor

Shows the vendor specific Vital Product Data (VPD) page information, using the VPD page abbreviation.

The multipathd daemon uses this information to gather device specific information. Currently only the hp3par VPD page is supported.

hardware_handler

Specifies the hardware handler to use for a particular device type. All possible values are hardware dependent and include:

emc: Hardware handler for DGC class arrays, as CLARiiON CX/AX and EMC VNX and Unity families.

rdac: Hardware handler for LSI/Engenio/NetApp RDAC class, as NetApp SANtricity E/EF Series, and OEM arrays from IBM DELL SGI STK and SUN.

hp_sw: Hardware handler for HP/COMPAQ/DEC HSG80 and MSA/HSV arrays with Active/Standby mode exclusively.

alua: Hardware handler for SCSI-3 ALUA compatible arrays.

ana: Hardware handler for NVMe ANA compatible arrays.

The default value is unset.

Important

​​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.

The attributes in the following list are optional. If you do not set them, the default values from the defaults sections apply. Refer to Configuration file defaults for a full description of these attributes.

  • path_grouping_policy
  • uid_attribute
  • getuid_callout
  • path_selector
  • path_checker
  • prio
  • prio_args
  • failback
  • alias_prefix
  • no_path_retry
  • rr_min_io
  • rr_min_io_rq
  • flush_on_last_del
  • features
  • reservation_key
  • user_friendly_names
  • deferred_remove
  • san_path_err_threshold
  • san_path_err_forget_rate
  • san_path_err_recovery_time
  • marginal_path_err_sample_time
  • marginal_path_err_rate_threshold
  • marginal_path_err_recheck_gap_time
  • marginal_path_double_failed_time
  • delay_watch_checks
  • delay_wait_checks
  • skip_kpartx
  • max_sectors_kb
  • ghost_delay
  • all_tg_pt

Additional resources

5.5. 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 attributes in the following list are optional. If you do not set them, default values from the devices or defaults sections apply.

  • path_grouping_policy
  • uid_attribute
  • getuid_callout
  • path_selector
  • path_checker
  • alias_prefix
  • features
  • prio
  • prio_args
  • failback
  • no_path_retry
  • rr_min_io
  • rr_min_io_rq
  • flush_on_last_del
  • fast_io_fail_tmo
  • dev_loss_tmo
  • eh_deadline
  • user_friendly_names
  • retain_attached_hw_handler
  • detect_prio
  • detect_checker
  • deferred_remove
  • san_path_err_threshold
  • san_path_err_forget_rate
  • san_path_err_recovery_time
  • marginal_path_err_sample_time
  • marginal_path_err_rate_threshold
  • marginal_path_err_recheck_gap_time
  • marginal_path_double_failed_time
  • delay_watch_checks
  • delay_wait_checks
  • skip_kpartx
  • max_sectors_kb
  • ghost_delay
  • all_tg_pt

The protocol subsection recognizes the following mandatory attribute:

Table 5.4. Protocol subsection attribute
AttributeDescription

type

Specifies the protocol string of the path device. Possible values include:

scsi:fcp, scsi:spi, scsi:ssa, scsi:sbp, scsi:srp, scsi:iscsi, scsi:sas, scsi:adt, scsi:ata, scsi:unspec, ccw, cciss, nvme, undef

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

5.6. 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 the recovery_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 the recovery_tmo value.

    The fast_io_fail_tmo option in DM Multipath also overrides the fast_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.7. Modifying multipath configuration file defaults

The /etc/multipath.conf configuration file includes a defaults section that sets the user_friendly_names parameter to yes, as follows.

defaults {
        user_friendly_names yes
}

This overwrites the default value of the user_friendly_names parameter. 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

  1. 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
    #}
  2. 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 to multibus instead of the default value of failover, 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
    }
  3. 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
  4. Reload the /etc/multipath.conf file and reconfigure the multipathd daemon for changes to take effect:

    # service multipathd reload

Additional resources

  • multipath.conf(5) and multipathd(8) man pages

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

  1. 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 of yellow.
    • The second multipath device in the example has a WWID of 1DEC_321816758474 and a symbolic name of red.

    In this example, the rr_weight attribute is set to priorities.

    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
            }
    }
  2. 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
  3. Reload the /etc/multipath.conf file and reconfigure the multipathd daemon for changes to take effect:

    # service multipathd reload

Additional resources

  • multipath.conf(5) man page

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

  1. 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
  2. Edit the overrides section of the /etc/multipath.conf file, by adding protocol subsections for each multipath type.

    • 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
              }
      }

The overrides section can include multiple protocol subsections.

Important

The protocol subsection must include a type parameter. The configuration of all paths with a matching type parameter is then updated with the rest of the parameters listed in the protocol subsection.

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

  1. 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.

  2. 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.
  3. Add a device that is not configured automatically by default to the devices section of the configuration file by setting the vendor and product 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
  4. 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 to multibus. Other parameters you may need to set are no_path_retry and rr_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 to tur, 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
    #	}
    #}
  5. 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
  6. Reload the /etc/multipath.conf file and reconfigure the multipathd daemon for changes to take effect:

    # service multipathd reload

Additional resources

  • multipath.conf(5) and multipathd(8) man pages

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

  1. Override device specific settings. For example, you might want all devices to set no_path_retry to fail. Use the following command to turn off queueing, when all paths have failed. This overrides any device specific settings.

    overrides {
            no_path_retry fail
    }
  2. 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
  3. Reload the /etc/multipath.conf file and reconfigure the multipathd daemon for changes to take effect:

    # service multipathd reload

Additional resources

  • multipath.conf(5) man page
Red Hat logoGithubRedditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita ilBlog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

© 2024 Red Hat, Inc.