4.5. 配置文件设备
表 4.3 “设备属性” 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.
默认情况下,在多路径配置中包括很多支持多路径的设备。这些设备支持的值默认列在
multipath.conf.defaults
文件中。您可以不需要修改这些设备,但如果修改了这些值,您可以通过在配置文件中为覆盖那些值的设备添加条目来覆盖默认值。您可以从 multipath.conf.defaults
文件中为设备复制设备配置默认设置并覆盖那些您想要修改的值。
要在配置文件的这个部分添加没有默认自动配置的设备,您需要设定
vendor
和 product
参数。您可在 /sys/block/device_name/device/vendor
和 /sys/block/device_name/device/model
文件中找到这些值,其中 device_name 是要进行多路径操作的设备,示例如下:
[root@cypher-06 ~]#cat /sys/block/sda/device/vendor
WINSYS [root@cypher-06 ~]#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 表 4.3 “设备属性”.
如果设备是主动/被动模式,但它会自动将路径切换到被动路径,那么您需要将检查器改为一个不需向路径发送 I/O 来测试其是否工作(否则,您的设备将一直进行出错冗余)的功能。这几乎意味着您将
path_checker
设为 tur
。这对所有支持 Test Unit Ready 命令的 SCSI 设备都适用。
If the device needs a special command to switch paths, then configuring this device for multipath requires a hardware handler kernel module. The current hardware handlers are
emc
and "rdac
. If these are not sufficient for your device, you may not be able to configure the device for multipath.
属性 | 描述 | ||||||
---|---|---|---|---|---|---|---|
vendor | 指定 device 采用的存储设备的零售商名称,例如 COMPAQ 。 | ||||||
product | 指定 device 属性使用的存储设备产品名,比如 HSV110 (C) COMPAQ 。 | ||||||
path_grouping_policy |
| ||||||
getuid_callout | Specifies the default program and arguments to call out to obtain a unique path identifier. An absolute path is required. | ||||||
prio_callout | Specifies the the default program and arguments to call out to obtain a 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 | 指定用来确定路径状态的默认方法。可能的值包括 readsector0 和 tur 、emc_clariion 、hp_sw 以及 directio 。 | ||||||
path_selector | 指定用来确定下一个 I/O 操作所使用路径的默认算法。 | ||||||
features | The extra features of multipath devices. The only existing feature is queue_if_no_path , which is the same as setting no_path_retry to queue . For information on issues that may arise when using this feature, see 第 5.3 节 “Issues with queue_if_no_path feature”. | ||||||
hardware_handler | 指定将在切换路径组群或者处理 I/O 错误时用来执行硬件具体动作的模块。可能的值包括 0 、1 emc 和 1 rdac 。默认值为 0 。 | ||||||
rr_weight |
| ||||||
no_path_retry |
| ||||||
failback |
| ||||||
rr_min_io | 指定在当前路径组群中切换到下一个路径前指向一个路径的 I/O 请求数目。默认值为 1000。 | ||||||
flush_on_last_del | (在 RHEL 5.3 以及之后的版本中)如果将其设定为 yes ,multipathd 守护进程将在删除了最后一个到某个设备的路径时禁用查询。默认值为 no 。 | ||||||
product_blacklist | 根据产品指定用来将设备列入黑名单的常规表达式。 |
以下示例显示了多路径配置文件的
device
条目。
# } # device { # vendor "COMPAQ " # product "MSA1000 " # path_grouping_policy multibus # path_checker tur # rr_weight priorities # } #}