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
指​​​​​​​定​​​​​​​用​​​​​​​于​​​​​​​未​​​​​​​指​​​​​​​定​​​​​​​路​​​​​​​径​​​​​​​的​​​​​​​默​​​​​​​认​​​​​​​路​​​​​​​径​​​​​​​分​​​​​​​组​​​​​​​策​​​​​​​略​​​​​​​,可​​​​​​​能​​​​​​​的​​​​​​​值​​​​​​​包​​​​​​​括​​​​​​​:
failover = 每​​​​​​​个​​​​​​​优​​​​​​​先​​​​​​​组​​​​​​​群​​​​​​​有​​​​​​​一​​​​​​​个​​​​​​​路​​​​​​​径​​​​​​​
multibus = 所​​​​​​​有​​​​​​​有​​​​​​​效​​​​​​​路​​​​​​​径​​​​​​​在​​​​​​​一​​​​​​​个​​​​​​​优​​​​​​​先​​​​​​​组​​​​​​​群​​​​​​​中​​​​​​​
group_by_serial = 每​​​​​​​个​​​​​​​检​​​​​​​测​​​​​​​到​​​​​​​的​​​​​​​系​​​​​​​列​​​​​​​号​​​​​​​有​​​​​​​一​​​​​​​个​​​​​​​优​​​​​​​先​​​​​​​组​​​​​​​群​​​​​​​
group_by_prio = 每​​​​​​​个​​​​​​​路​​​​​​​径​​​​​​​优​​​​​​​先​​​​​​​值​​​​​​​有​​​​​​​一​​​​​​​个​​​​​​​优​​​​​​​先​​​​​​​组​​​​​​​群​​​​​​​
group_by_node_name = 每​​​​​​​个​​​​​​​目​​​​​​​标​​​​​​​节​​​​​​​点​​​​​​​名​​​​​​​有​​​​​​​一​​​​​​​个​​​​​​​优​​​​​​​先​​​​​​​组​​​​​​​群​​​​​​​
默​​​​​​​认​​​​​​​值​​​​​​​为​​​​​​​ failover。​​​​​​​
getuid_callout
Specifies the default program and arguments to call out to obtain a unique path identifier. An absolute path is required.
默​​​​​​​认​​​​​​​值​​​​​​​为​​​​​​​ /sbin/scsi_id -g -u -s。​​​​​​​
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
If set to priorities, then instead of sending rr_min_io requests to a path before calling 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_callout program. Currently, there are priority callouts only for devices that use the group_by_prio path grouping policy, which means that all the paths in a path group will always have the same priority.
如​​​​​​​果​​​​​​​将​​​​​​​其​​​​​​​设​​​​​​​为​​​​​​​ uniform,那​​​​​​​么​​​​​​​所​​​​​​​有​​​​​​​路​​​​​​​径​​​​​​​加​​​​​​​权​​​​​​​是​​​​​​​相​​​​​​​等​​​​​​​的​​​​​​​。​​​​​​​默​​​​​​​认​​​​​​​值​​​​​​​为​​​​​​​ uniform。​​​​​​​
failback
指​​​​​​​定​​​​​​​路​​​​​​​径​​​​​​​组​​​​​​​群​​​​​​​出​​​​​​​错​​​​​​​切​​​​​​​换​​​​​​​。​​​​​​​
数​​​​​​​值​​​​​​​ 0 或​​​​​​​者​​​​​​​ immediate 指​​​​​​​定​​​​​​​一​​​​​​​旦​​​​​​​存​​​​​​​在​​​​​​​优​​​​​​​先​​​​​​​权​​​​​​​高​​​​​​​于​​​​​​​现​​​​​​​有​​​​​​​路​​​​​​​径​​​​​​​组​​​​​​​群​​​​​​​的​​​​​​​路​​​​​​​径​​​​​​​组​​​​​​​群​​​​​​​,那​​​​​​​么​​​​​​​系​​​​​​​统​​​​​​​将​​​​​​​切​​​​​​​换​​​​​​​到​​​​​​​那​​​​​​​个​​​​​​​路​​​​​​​径​​​​​​​组​​​​​​​群​​​​​​​。​​​​​​​
大​​​​​​​于​​​​​​​ 0 的​​​​​​​数​​​​​​​字​​​​​​​值​​​​​​​指​​​​​​​定​​​​​​​推​​​​​​​迟​​​​​​​出​​​​​​​错​​​​​​​切​​​​​​​换​​​​​​​,以​​​​​​​秒​​​​​​​表​​​​​​​示​​​​​​​。​​​​​​​
manual 值​​​​​​​表​​​​​​​明​​​​​​​只​​​​​​​能​​​​​​​在​​​​​​​操​​​​​​​作​​​​​​​员​​​​​​​介​​​​​​​入​​​​​​​时​​​​​​​才​​​​​​​会​​​​​​​发​​​​​​​生​​​​​​​出​​​​​​​错​​​​​​​切​​​​​​​换​​​​​​​。​​​​​​​
默​​​​​​​认​​​​​​​值​​​​​​​为​​​​​​​ manual。​​​​​​​
no_path_retry
这​​​​​​​个​​​​​​​属​​​​​​​性​​​​​​​的​​​​​​​数​​​​​​​字​​​​​​​值​​​​​​​指​​​​​​​定​​​​​​​系​​​​​​​统​​​​​​​在​​​​​​​禁​​​​​​​用​​​​​​​队​​​​​​​列​​​​​​​前​​​​​​​应​​​​​​​该​​​​​​​试​​​​​​​图​​​​​​​使​​​​​​​用​​​​​​​失​​​​​​​败​​​​​​​的​​​​​​​路​​​​​​​径​​​​​​​的​​​​​​​次​​​​​​​数​​​​​​​。​​​​​​​
fail 值​​​​​​​表​​​​​​​明​​​​​​​立​​​​​​​即​​​​​​​失​​​​​​​败​​​​​​​,无​​​​​​​需​​​​​​​排​​​​​​​队​​​​​​​。​​​​​​​
queue 值​​​​​​​表​​​​​​​明​​​​​​​在​​​​​​​路​​​​​​​径​​​​​​​修​​​​​​​复​​​​​​​前​​​​​​​不​​​​​​​应​​​​​​​停​​​​​​​止​​​​​​​排​​​​​​​队​​​​​​​。​​​​​​​
默​​​​​​​认​​​​​​​至​​​​​​​为​​​​​​​(空​​​​​​​白​​​​​​​)。​​​​​​​
flush_on_last_del (在​​​​​​​ RHEL 5.3 以​​​​​​​及​​​​​​​之​​​​​​​后​​​​​​​的​​​​​​​版​​​​​​​本​​​​​​​中​​​​​​​)如​​​​​​​果​​​​​​​将​​​​​​​其​​​​​​​设​​​​​​​定​​​​​​​为​​​​​​​ yesmultipathd 守​​​​​​​护​​​​​​​进​​​​​​​程​​​​​​​将​​​​​​​在​​​​​​​删​​​​​​​除​​​​​​​了​​​​​​​最​​​​​​​后​​​​​​​一​​​​​​​个​​​​​​​到​​​​​​​某​​​​​​​个​​​​​​​设​​​​​​​备​​​​​​​的​​​​​​​路​​​​​​​径​​​​​​​时​​​​​​​禁​​​​​​​用​​​​​​​查​​​​​​​询​​​​​​​。​​​​​​​默​​​​​​​认​​​​​​​值​​​​​​​为​​​​​​​ no。​​​​​​​
queue_without_daemon (在​​​​​​​ RHEL 5.3 以​​​​​​​及​​​​​​​之​​​​​​​后​​​​​​​的​​​​​​​版​​​​​​​本​​​​​​​中​​​​​​​)如​​​​​​​果​​​​​​​将​​​​​​​其​​​​​​​设​​​​​​​定​​​​​​​为​​​​​​​ nomultipathd 守​​​​​​​护​​​​​​​进​​​​​​​程​​​​​​​将​​​​​​​在​​​​​​​关​​​​​​​闭​​​​​​​后​​​​​​​禁​​​​​​​用​​​​​​​对​​​​​​​所​​​​​​​有​​​​​​​设​​​​​​​备​​​​​​​的​​​​​​​查​​​​​​​询​​​​​​​。​​​​​​​默​​​​​​​认​​​​​​​值​​​​​​​为​​​​​​​ yes。​​​​​​​
user_friendly_names 如​​​​​​​果​​​​​​​将​​​​​​​其​​​​​​​设​​​​​​​为​​​​​​​ yes,即​​​​​​​该​​​​​​​系​​​​​​​统​​​​​​​应​​​​​​​该​​​​​​​使​​​​​​​用​​​​​​​文​​​​​​​件​​​​​​​ bindings 来​​​​​​​将​​​​​​​一​​​​​​​个​​​​​​​持​​​​​​​久​​​​​​​且​​​​​​​唯​​​​​​​一​​​​​​​的​​​​​​​别​​​​​​​名​​​​​​​分​​​​​​​配​​​​​​​给​​​​​​​多​​​​​​​路​​​​​​​径​​​​​​​,格​​​​​​​式​​​​​​​为​​​​​​​ mpathn。​​​​​​​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。​​​​​​​默​​​​​​​认​​​​​​​值​​​​​​​由​​​​​​​具​​​​​​​体​​​​​​​进​​​​​​​程​​​​​​​决​​​​​​​定​​​​​​​。​​​​​​​