heartbeat的配置文件 要一致吗?

renwofei423 2010-09-30 10:01:07
heartbeat的配置文件 要一致吗?

autheys 肯定是要一致的

ha.cf 有时候设置
ucast eth0 192.168.90.91
ucast eth0 192.168.90.92
这里需要设置对方Ip所以ha.cf不一定需要一样吧?


那么haresources文件呢?如:
node1 192.168.90.100 mysqld vsftpd
这个node1 到底是每台机器一样 还是指对方机器?
...全文
69 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
believe1314 2010-10-19
  • 打赏
  • 举报
回复
[Quote=引用楼主 renwofei423 的回复:]
heartbeat的配置文件 要一致吗?

autheys 肯定是要一致的 这个文件只要认证改成一样,里面哪句先哪句后无所谓

ha.cf 有时候设置
ucast eth0 192.168.90.91
ucast eth0 192.168.90.92 ###这个文件可以不一样,但是节点ip必须一样,先写哪个不规定

这里需要设置对方Ip所以ha.cf不一定需要一样吧?


harescourse资源文件肯定要一样的啦






那么haresources文件呢?如:
node1 192.168.90.100 mysqld vsftpd
这个……
[/Quote]
这个肯定要一样啦,俩个机器守护一个资源,不一样的资源怎么自动热备,可能连服务都启不起来。
renwofei423 2010-10-11
  • 打赏
  • 举报
回复
ha_propagate 脚本:


#!/usr/bin/python
#
# Support: linux-ha-dev@lists.tummy.com
# License: GNU General Public License (GPL)
#
# This script read the list of nodes from the ha.cf file
# and then uses 'scp' to copy the ha.cf file to each node.
#

import os, sys
from stat import *

cfgdir = "/etc/ha.d/"
cfgfile = cfgdir + "ha.cf"
authfile = cfgdir + "authkeys"

try:
os.stat(cfgfile)
os.stat(authfile)
except:
print "HA Linux not configured on this node. Can not propagate."
sys.exit()

nodes = []

f=open(cfgfile)
for line in f:
if line.startswith("node"):
toks = line.split()
if (len(toks) == 2):
nodeName = toks[1]
nodes.append(nodeName)
f.close()

thisnode = os.uname()[1]
if nodes.count(thisnode) > 0:
nodes.remove(thisnode)

for i, v in enumerate(nodes):
print "Propagating HA configuration files to node " + v + "."
res = os.system("scp " + cfgfile + " " + authfile + " root@" + v + ":" + cfgdir)
print "Setting HA startup configuration on node " + v + "."
res = os.system("ssh " + " root@" + v + " chkconfig `chkconfig heartbeat`")


renwofei423 2010-10-11
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 guosha 的回复:]

ucast是不需要一样的,
haresources里的配置的应该是浮动ip吧,不是任意一台的实际ip.
[/Quote]
后面的Ip地址我知道 是浮动ip,我是问的node

官方自带的 /usr/share/heartbeat/ 下的 ha_propagate 脚本(python脚本)就是自动将ha.cf authkeys拷贝到另外的机器,可以看出 一般情况下是一样的 ucast 是特例吧
快乐田伯光 2010-10-09
  • 打赏
  • 举报
回复
ucast是不需要一样的,
haresources里的配置的应该是浮动ip吧,不是任意一台的实际ip.
renwofei423 2010-10-08
  • 打赏
  • 举报
回复
顶起来 希望有人回答
renwofei423 2010-10-08
  • 打赏
  • 举报
回复
顶起来 希望有人回答
renwofei423 2010-09-30
  • 打赏
  • 举报
回复
有没有人知道啊~

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧