Multipath配置文件详解
defaults{ user_friendly_names yes //若设置yes,则使用/etc/multipath/bindings中的对应绑定来命名合并路径,以mpath<n>的形式;若设置no(默认),则使用WWID来命名 checker_timeout 20 //scsi命令路径检查超时时间,默认从/sys/block/sd<x>/device/timeout取值 polling_interval 10 //两次路径检查的间隔时间,将逐渐增加至(4 * polling_interval),默认为5s queue_without_daemon no //若为no,则multipathd将停止已关闭设备的排队,默认为yes flush_on_last_del yes //若为yes,则multipathd将停止已删除设备最后路径的排队,默认为no } blacklist { devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" //需排除设备的正则表达式 devnode "^(hd|xvd)[a-z][[0-9]*]" devnode "^cciss!c[0-9]d[0-9]*[p[0-9]*" wwid "ATA" //设备的World Wide Identification } devices { device { vendor "Sugon" //厂商名称 product "DS800" //产品型号 path_grouping_policy group_by_prio //默认的路径组策略 getuid_callout "/sbin/scsi_id --whitelisted --device=/dev/%n" //获得唯一设备号使用的默认程序,应使用绝对路径,默认为/lib/udev/scsi_id --whitelisted --device=/dev/%n prio "sugon_alua" //获取路径priority value的方法 path_checker tur //决定路径状态的方法,readsector0表示Read the first sector of the device,tur表示Issue a TEST UNIT READY command to the device path_selector "round-robin 0" //选择哪条路径进行下一个IO操作的方法,由multipath target内核提供,round-robin 0表示Loop through every path in the path group, sending the same amount of IO to each hardware_handler "1 alua" //用于此存储的硬件处理程序,1 alua表示SCSI-3 ALUA arrays failback immediate //故障恢复的模式,immediate表示立即恢复到最高优先级组中的active路径;manual表示不执行自动恢复,默认为manual rr_weight uniform rr_min_io_rq 100 //在当前的路径组中,切换到另外一条路径之前的IO请求数目(系统内核高于2.6.31时使用,默认值为1;低于2.6.31时使用rr_min_io,默认值为1000) no_path_retry queue //在disable queue之前系统尝试使用失效路径的次数,queue表示never stop queueing,默认为0 features "1 queue_if_no_path" //Queue IO if no path is active,同no_path_retry product_blacklist "DS800 V-LUN" //产品黑名单 fast_io_fail_tmo 20 //发现问题时停止IO前的等待时间,应小于dev_loss_tmo dev_loss_tmo 86400 //发现问题时移除路径前的等待时间 } }
下面是相关参数的标准文档的介绍:
Attribute |
Description |
|||||||||
wwid |
Specifies the WWID of the multipath device to which themultipath attributes apply. This parameter is mandatory for this section of themultipath.conf file. |
|||||||||
alias |
Specifies the symbolic name for the multipath device to which themultipath attributes apply. If you are usinguser_friendly_names, do not set this value tompathn; this may conflict with an automatically assigned user friendly name and give you incorrect device node names. |
|||||||||
path_grouping_policy |
|
|||||||||
path_selector |
|
|||||||||
failback |
|
|||||||||
prio |
|
|||||||||
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 userr_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. |
|||||||||
rr_weight |
If set to priorities, then instead of sending rr_min_iorequests to a path before calling path_selector to choose the next path, the number of requests to send is determined byrr_min_io times the path's priority, as determined by theprio function. If set to uniform, all path weights are equal. |
|||||||||
flush_on_last_del |
If set to yes, then multipath will disable queueing when the last path to a device has been deleted. |
更多参数解释见 https://linux.die.net/man/5/multipath.conf
4 实例
![](https://img2018.cnblogs.com/blog/956625/201902/956625-20190218093005088-144290288.png)
posted on 2019-02-18 09:31 seabiscuit0922 阅读(1372) 评论(0) 编辑 收藏 举报