0

我已经为围栏创建了一个空的 shell 脚本,如下所示

#!/bin/bash
echo "success: myfence $2"
exit 0

我已将其添加到 cluster.conf 中,但是在测试我关闭以太网时,我收到了以下错误。

Feb 10 07:58:36 node2 fenced[2006]: fenced 3.0.12.1 started
Feb 10 07:58:36 node2 fenced[2006]: failed to get dbus connection
Feb 10 08:06:52 node2 fenced[1982]: fenced 3.0.12.1 started
Feb 10 08:06:52 node2 fenced[1982]: failed to get dbus connection
Feb 10 08:11:38 node2 fenced[1928]: fenced 3.0.12.1 started
Feb 10 08:11:38 node2 fenced[1928]: failed to get dbus connection
Feb 10 08:20:07 node2 fenced[1928]: fencing node node1.example.com
Feb 10 08:20:07 node2 fenced[1928]: fence node1.example.com dev 0.0 agent none result: error no method
Feb 10 08:20:07 node2 fenced[1928]: fence node1.example.com failed
Feb 10 08:20:10 node2 fenced[1928]: fencing node node1.example.com
Feb 10 08:20:10 node2 fenced[1928]: fence node1.example.com dev 0.0 agent none result: error no method
Feb 10 08:20:10 node2 fenced[1928]: fence node1.example.com failed
Feb 10 08:20:13 node2 fenced[1928]: fencing node node1.example.com
Feb 10 08:20:13 node2 fenced[1928]: fence node1.example.com dev 0.0 agent none result: error no method
Feb 10 08:20:13 node2 fenced[1928]: fence node1.example.com failed

它不工作!在这个阶段我的集群挂在围栏上......但是当我运行fence_ack_manual它时它可以工作!

4

1 回答 1

0

我自己解决了。在 cluster.conf 中添加了以下几行并繁荣!!!

<clusternodes>
                <clusternode name="CentOS1" nodeid="1" votes="1">
                         <fence>
                                <method name="1">
                                        <device nodename="CentOS1" name="myfence"/>
                                </method>
                        </fence>
                </clusternode>

                <clusternode name="CentOS2" nodeid="2" votes="1">
                        <fence>
                                <method name="2">
                                        <device nodename="CentOS2" name="myfence"/>
                                </method>
                        </fence>
                </clusternode>
        </clusternodes>
于 2013-02-10T21:08:50.020 回答