Red Hat Training
A Red Hat training course is available for Red Hat Enterprise Linux
4.3. 配置文件默认设置
/etc/multipath.conf
配置文件包括 defaults
部分,在该部分中将 user_friendly_names
参数设为 yes
,如下。
defaults { user_friendly_names yes }
这可覆盖
user_friendly_names
参数的默认值。
该配置文件包括配置默认模板。这部分要被注释出来,如下。
#defaults { # udev_dir /dev # polling_interval 10 # selector "round-robin 0" # path_grouping_policy multibus # getuid_callout "/sbin/scsi_id -g -u -s /block/%n" # prio_callout /bin/true # path_checker readsector0 # rr_min_io 100 # max_fds 8192 # rr_weight priorities # failback immediate # no_path_retry fail # user_friendly_names yes #}
要覆盖任意配置参数的默认值,您可将这个模板中相关的行复制到
defaults
部分并取消其注释。例如:要覆盖 path_grouping_policy
参数以便用 multibus
覆盖默认的 failover
,请将模板中正确的行复制到配置文件的 defaults
部分并取消对它的注释,如下。
defaults { user_friendly_names yes path_grouping_policy multibus }
表 4.1 “多路径配置默认设置” 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.
表 4.1. 多路径配置默认设置
属性 | 描述 | |||||||
---|---|---|---|---|---|---|---|---|
udev_dir | 指定生成 udev 设备节点的目录,默认值为 /udev 。 | |||||||
polling_interval | 以秒数指定检查两个路径间的时间间隔,默认值为 5。 | |||||||
selector | 指定用来确定下一个 I/O 操作所使用的路径的默认算法,默认值为 round-robin 0 。 | |||||||
path_grouping_policy |
| |||||||
getuid_callout |
| |||||||
prio_callout | Specifies the the default program and arguments to call out to obtain a path priority value. For example, the ALUA bits in SPC-3 provide an exploitable prio value for example. "none" is a valid value. The default value is no callout, indicating all paths are equal | |||||||
path_checker | 指定用来确定路径状态的默认方法。可能的值有 readsector0 、tur 、emc_clariion 、hp_sw 和 directio 。默认值为 readsector0 。 | |||||||
rr_min_io | 指定在当前路径组群中切换到下一个路径前指向一个路径的 I/O 请求数目。默认值为 1000。 | |||||||
max_fds | (RHEL 5.2 以及之后的版本)会为 multipathd 进程设定打开文件描述符的最大值。在 RHEL 5.3 中,这个选项允许值 max ,它可将打开文件描述符的数目设置为系统可承受的最大值。 | |||||||
rr_weight |
| |||||||
failback |
| |||||||
no_path_retry |
| |||||||
flush_on_last_del | (在 RHEL 5.3 以及之后的版本中)如果将其设定为 yes ,multipathd 守护进程将在删除了最后一个到某个设备的路径时禁用查询。默认值为 no 。 | |||||||
queue_without_daemon | (在 RHEL 5.3 以及之后的版本中)如果将其设定为 no ,multipathd 守护进程将在关闭后禁用对所有设备的查询。默认值为 yes 。 | |||||||
user_friendly_names | 如果将其设为 yes ,即该系统应该使用文件 bindings 来将一个持久且唯一的别名分配给多路径,格式为 mpath n 。bindings 文件的默认位置为 /var/lib/multipath/bindings ,但使用 bindings_file 选项可改变此位置。如果将其设为 no ,即该系统应该使用 WWID 作为多路径的别名。在这两种情况下,您在这里指定的数值将被您在配置文件 multipaths 部分指定的具体设备别名覆盖。默认值为 no 。 | |||||||
bindings_file | (在 RHEL 5.2 以及之后的版本中)bindings 文件的位置与 user_friend_names 选项一同使用。默认值为 /var/lib/multipath/bindings 。 | |||||||
mode | (在 RHEL 5.3 以及之后的版本中)多路径设备节点使用的 mode 是八进制的。默认值由具体进程决定。 | |||||||
uid | (在 RHEL 5.3 以及之后的版本中)多路径设备节点使用的用户 ID。您必须使用数字用户 ID。默认值由具体进程决定。 | |||||||
gid | (在 RHEL 5.3 以及之后的版本中)多路径设备节点使用的组群 ID。您必须使用数字组群 ID。默认值由具体进程决定。 |