xiangsheng 发表于 2013-2-7 13:13:10

heartbeat配置说明(3)

1.3.2.ha.cf
文件所在:/etc/ha.d/ha.cf
中文注释来自linuxer_jlu,蓝色部分是我在主服务器的配置。两台服务器的这个配置文件内容完全相同。
为了保证能够正常启动,需要创建两个用户,分别是haclient和hacluster。
指令如下:
useradd haclient
useradd hacluster
下面灰色背景部分是配置文件内容:蓝色字的部分是具体配置
#用于记录heartbeat的调试信息
#debugfile /var/log/ha-debug
#logfile用于记录heartbeat的日志信息
logfile /var/log/ha.log
#如果未定义上述的日志文件,那么日志信息将送往local0(对应的#/var/log/messages),如果
#这3个日志文件都未定义,那么heartbeat默认情况下
#将在/var/log下建立ha-debug和ha-log来记录相应的日志信息。
logfacilitylocal0
#发送心跳报文的间隔,默认单位为秒,如果你毫秒为单位,那么需要在后面跟
#ms单位,如1500ms即代表1.5s
keepalive 2
#用于配置认为对方节点菪掉的间隔
deadtime 30
#发出最后的心跳警告报文的间隔
warntime 10
#网络启动的时间
initdead 60
#广播/单播通讯使用的udp端口
udpport694
#串口通讯的波特率
#baud19200
#serialserialportname ...
#使用的串口设备,在linux上即为/dev/ttyS0(1,2,3…)
#serial/dev/ttyS0# Linux
#serial/dev/cuaa0# FreeBSD
#serial /dev/cuad0      # FreeBSD 6.x
#serial/dev/cua/a# Solaris
#心跳所使用的网络接口
#bcasteth0# Linux
#bcasteth1 eth2# Linux
#bcasteth1
#bcastle0# Solaris
#bcastle1 le2# Solaris
#bcasteth1为心跳网卡,注:主备心跳网卡名称必须一样
bcast eth1
#Set up a multicast heartbeat medium
#mcast
#
#device to send/rcv heartbeats on
#multicast group to join (class D multicast address
#224.0.0.0 - 239.255.255.255)
#udp port to sendto/rcvfrom (set this value to the
#same value as "udpport" above)
#the ttl value for outbound heartbeats.this effects
#how far the multicast packet will propagate.(0-255)
#Must be greater than zero.
#toggles loopback for outbound multicast heartbeats.
#if enabled, an outbound packet will be looped back and
#received by the interface it was sent on. (0 or 1)
#Set this value to zero.
#
#如果采用组播通讯,在这里可以设置组播通讯所使用的接口,绑定的组播ip地
#址(在224.0.0.0 - 239.255.255.255间),通讯端口,ttl(time to live)所能经过路由的
#跳数,是否允许环回(也就是本地发出的数据包时候还接收)
#mcast eth0 225.0.0.1 694 1 0
#
页: [1]
查看完整版本: heartbeat配置说明(3)