如何“修复”设备映射器多path中的错误path

我有一个多pathconfiguration工作,但现在显示“错误”的path:

[root@nas ~]# multipath -ll sdd: checker msg is "readsector0 checker reports path is down" mpath1 (36001f93000a63000019f000200000000) dm-2 XIOTECH,ISE1400 [size=200G][features=0][hwhandler=0][rw] \_ round-robin 0 [prio=1][active] \_ 1:0:0:1 sdb 8:16 [active][ready] \_ round-robin 0 [prio=0][enabled] \_ 2:0:0:1 sdd 8:48 [active][faulty] 

同时我在/var/log/messages看到了这三行

 Feb 5 12:52:57 nas kernel: sd 2:0:0:1: SCSI error: return code = 0x00010000 Feb 5 12:52:57 nas kernel: end_request: I/O error, dev sdd, sector 0 Feb 5 12:52:57 nas kernel: Buffer I/O error on device sdd, logical block 0 

这条线也经常出现

 Feb 5 12:52:58 nas multipathd: sdd: readsector0 checker reports path is down 

有一件事我不明白的是为什么在我的/etc/multipath.conf文件中使用readsector0检查方法来使用tur

[root @ nas〜]#tail -n15 /etc/multipath.conf

 devices { device { vendor "XIOTECH " product "ISE1400 " path_grouping_policy multibus getuid_callout "/sbin/scsi_id -g -u -d /dev/%n" path_checker tur prio_callout "none" path_selector "round-robin 0" failback immediate no_path_retry 12 user_friendly_names yes } } 

看这里的上游文件这段看起来是相关的: http : //christophe.varoqui.free.fr/usage.html

 For each path: \_ host:channel:id:lun devnode major:minor [path_status][dm_status_if_known] The dm status (dm_status_if_known) is like the path status (path_status), but from the kernel's point of view. The dm status has two states: "failed", which is analogous to "faulty", and "active" which covers all other path states. Occasionally, the path state and the dm state of a device will temporarily not agree. 

它已经超过了24小时,所以它不是暂时的。

因此,所有的背景我的问题是
– 我如何确定这里的根本原因?
– 我怎么手动/命令行执行任何检查它的行为
– 为什么忽略我的multipath.conf(我做错了吗?)

在此先感谢您的任何build议,如果还有其他信息可以提供给我,请在评论中告诉我,我会将其编辑到post中。

在multipath.conf中,有一个微妙的错误, 供应商产品在正则expression式级别匹配,您添加了一系列前导空格,导致multipathd无法将您的configuration与系统上的实际设备相匹配。 如果您要检查echo 'show config' | multipathd -k的输出 echo 'show config' | multipathd -k你会发现SAN的两个设备部分,一个匹配你添加的所有额外空间,以及内部数据库提供的默认configuration(如果存在)。

调整你的multipath.conf看起来像这样:

  vendor "XIOTECH " product "ISE1400.*" 

SCSI Inquiry期望供应商字段不超过8个字符由一个ASCII零终止,如果您不使用全部8您必须填充字段与空格达到8个字符。 Multipathd正在将规范解释为法律条款,如果您确实想要,也可以做"XIOTECH.*"

一旦你做了这些改变,停止多path使用你的脚本,多path-F将刷新你的configuration,然后再次启动多path。 现在你的configuration文件应该被尊重。 如果仍有问题,请重新启动。

如果有人怀疑你的configuration文件没有被遵守,那么总是使用echo咒语检查正在运行的configuration文件,并将数据库中加载的内容与configuration文件进行比较。