Este conteúdo não está disponível no idioma selecionado.
4.5. Configuration File Devices
Table 4.3, “Device Attributes” shows the attributes that you can set for each individual storage device in the
devices
section of the multipath.conf
configuration file. These attributes are used by DM Multipath 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 defaults
section of the multipath.conf
file.
Many devices that support multipathing are included by default in a multipath configuration. For information on the default configuration value, including supported devices, run either of the following commands.
#multipathd show config
#multipath -t
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 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.
To add a device that is not configured automatically by default to this section of the configuration file, 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:
#cat /sys/block/sda/device/vendor
WINSYS #cat /sys/block/sda/device/model
SF2372
The additional parameters to specify depend on your specific device. If the device is active/active, you will usually not need to set additional parameters. You may want to set
path_grouping_policy
to multibus
. Other parameters you may need to set are no_path_retry
and rr_min_io
, as described in Table 4.3, “Device Attributes”.
If the device is active/passive, but 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 almost always means that you set the
path_checker
to tur
; this 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 may not be able to configure the device for multipath.
Attribute | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
vendor | Specifies the vendor name of the storage device to which the device attributes apply, for example COMPAQ . | ||||||||
product | Specifies the product name of the storage device to which the device attributes apply, for example HSV110 (C)COMPAQ . | ||||||||
revision | Specifies the product revision identifier of the storage device. | ||||||||
product_blacklist | Specifies a regular expression used to blacklist devices by product. | ||||||||
alias_prefix | The user_friendly_names prefix to use for this device type, instead of the default "mpath". | ||||||||
hardware_handler |
| ||||||||
path_grouping_policy |
| ||||||||
path_selector |
| ||||||||
path_checker |
| ||||||||
features |
| ||||||||
prio |
| ||||||||
failback |
| ||||||||
rr_weight | If set to priorities , then instead of sending rr_min_io requests to a path before calling path_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 function. If set to uniform , all path weights are equal. | ||||||||
no_path_retry |
| ||||||||
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 that 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, using request-based device-mapper-multipath. This setting should 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. | ||||||||
fast_io_fail_tmo | The number of seconds the SCSI layer will wait after a problem has been detected on an FC remote port before failing I/O to devices on that remote port. This value should be smaller than the value of dev_loss_tmo . Setting this to off will disable the timeout. The fast_io_fail_tmo option overrides the values of the recovery_tmo and replacement_timeout options. For details, see Section 4.6, “iSCSI and DM Multipath overrides”. | ||||||||
dev_loss_tmo | The number of seconds the SCSI layer will wait after a problem has been 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. | ||||||||
flush_on_last_del | If set to yes , the multipathd daemon will disable queuing when the last path to a device has been deleted. | ||||||||
user_friendly_names | If set to yes , specifies that the system should use the /etc/multipath/bindings file to assign a persistent and unique alias to the multipath, in the form of mpath n . If set to no , specifies that the system should use use the WWID as the alias for the multipath. In either case, what is specified here will be overridden by any device-specific aliases you specify in the multipaths section of the configuration file. The default value is no . | ||||||||
retain_attached_hw_handler | If this parameter is set to yes and the SCSI layer has already attached a hardware handler to the path device, multipath will not force the device to use the hardware_handler specified by the multipath.conf file. If the SCSI layer has not attached a hardware handler, multipath will continue to use its configured hardware handler as usual. The default value is no . | ||||||||
detect_prio | If this is set to yes , multipath will first check if the device supports ALUA, and if so it will automatically assign the device the alua prioritizer. If the device does not support ALUA, it will determine the prioritizer as it always does. | ||||||||
uid_attribute | Provides a unique path identifier. | ||||||||
delay_watch_checks | (Red Hat Enterprise Linux Release 7.2 and later) If set to a value greater than 0, the multipathd daemon will watch paths that have recently become valid for the specified number of checks. If they fail again while they are being watched, when they next become valid they will not be used until they have stayed up for the number of consecutive checks specified with delay_wait_checks . This allows you to keep paths that may be unreliable from immediately being put back into use as soon as they come back online. | ||||||||
delay_wait_checks | (Red Hat Enterprise Linux Release 7.2 and later) If set to a value greater than 0, when a device that has recently come back online fails again within the number of checks specified with delay_watch_checks , the next time it comes back online it will be marked and delayed and it will not be used until it has passed the number of checks specified in delay_wait_checks . | ||||||||
deferred_remove | If set to yes , multipathd will do a deferred remove instead of a regular remove when the last path device has been deleted. This ensures that if a multipathed device is in use when a regular remove is performed and the remove fails, the device will automatically be removed when the last user closes the device. | ||||||||
skip_kpartx | (Red Hat Enterprise Linux Release 7.3 and later) If set to yes , kpartx will not automatically create partitions on the device. This allows users to create a multipath device without creating partitions, even if the device has a partition table. | ||||||||
max_sectors_kb | (Red Hat Enterprise Linux Release 7.4 and later) Sets the max_sectors_kb device queue parameter to the specified value on all underlying paths of a multipath device before the multipath device is first activated. When a multipath device is created, 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 a multipath device is created on top of the path devices and prevent invalid-sized I/O operations from being passed If this parameter is not set by the user, the path devices have it set by their device driver, and the multipath device inherits it from the path devices. | ||||||||
detect_path_checker | (Red Hat Enterprise Linux Release 7.4 and later) If set to yes , multipath will try to detect if the device supports ALUA. If so, the device will automatically use the tur path checker. If not, the path_checker will be selected as usual. | ||||||||
all_devs | When this parameter is set to yes , all of the options set in this device configuration will override the values for those options in all of the other device configurations, both the ones in the configuration file and the built-in defaults. | ||||||||
all_tg_pt | (Red Hat Enterprise Linux Release 7.6 and later) If this option is set to yes , when mpathpersist registers keys it will treat a key registered 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 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 # } #}
The following configuration sets
no_path_retry
to fail
for all of the built-in device configurations.
devices { device { all_devs yes no_path_retry fail } }