2个corosync节点不在线(一个离线,一个在线)

2个corosync节点不在线(一个离线,一个在线)

我目前正在尝试根据本教程设置 corosync:

http://www.howtoforge.com/how-to-set-up-an-active-passive-postgresql-cluster-with-pacemaker-corosync-and-drbd-centos-5.5-p3

但是,我无法连接我的两个节点。

我有2个节点:

data-master with IP address LAN: 10.0.0.122, Crossover: 172.16.0.1
data-slave with IP address LAN: 10.0.0.123, Crossover: 172.16.0.2

这是我的 /etc/corosync/corosync.conf(与教程完全相同):

兼容性:whitetank

totem {
   version: 2
   secauth: off
   threads: 0
   interface {
       ringnumber: 0
       bindnetaddr: 10.0.0.0
       mcastaddr: 226.94.1.1
       mcastport: 4000
   }
}

logging {
   fileline: off
   to_stderr: yes
   to_logfile: yes
   to_syslog: yes
   logfile: /tmp/corosync.log
   debug: off
   timestamp: on
   logger_subsys {
      subsys: AMF
      debug: off
   }
}

amf {
   mode: disabled
}
aisexec {
   user: root
   group: root
}
service {
   # Load the Pacemaker Cluster Resource Manager
   name: pacemaker
   ver: 0
}     

我可以成功启动 openais 服务。但是,当我crm_mon -1在两个节点上检查时,它们有不同的结果:

节点 1(数据主节点)

Last updated: Tue Feb 25 19:24:48 2014
Last change: Tue Feb 25 18:49:19 2014 by root via cibadmin on data-master
Stack: classic openais (with plugin)
Current DC: data-master - partition WITHOUT quorum
Version: 1.1.9-2db99f1
2 Nodes configured, 2 expected votes
0 Resources configured.


Online: [ data-master ]
OFFLINE: [ data-slave ]

节点 2(数据从属)

Last updated: Tue Feb 25 19:25:10 2014
Last change: Tue Feb 25 18:47:17 2014 by root via cibadmin on data-master
Stack: classic openais (with plugin)
Current DC: data-slave - partition WITHOUT quorum
Version: 1.1.9-2db99f1
2 Nodes configured, 2 expected votes
0 Resources configured.


Online: [ data-slave ]
OFFLINE: [ data-master ]

我的期望是让两个节点同时在线:

Online: [ data-master data-slave ]

你们能帮我找出我到底错过了什么吗?

我的平台:VirtualBox,两个节点都使用带有 HA-Extension 的 SLES 11 SP3,两个 LAN 的客户 IP 地址都是桥接的,交叉是内部网络模式。

谢谢!

答案1

也许你需要切换到单播多播沟通。

在您的 corosync.conf 中尝试类似这样的操作:

totem {
        version: 2
        secauth: off
        interface {
                member {
                        memberaddr: 172.16.0.1
                }
                member {
                        memberaddr: 172.16.0.2
                }
                ringnumber: 0
                bindnetaddr: 172.16.0.0
                mcastport: 5405
        }
        transport: udpu
}

相关内容