heatbeat
- mcedit /etc/hosts
192.168.10.101 node2
Имя должно возвращаться в результате выполнения следующей команды на обоих серверах
- uname -n
Меняем тут же
- mcedit /etc/hosts
127.0.0.1 localhost node1 localhost4 localhost4.localdomain4
- service network restart
- yum install -y epel-release
- yum install -y heartbeat
- nano /etc/ha.d/ha.cf
logfile /var/log/ha.log
keepalive 500ms
deadtime 10
warntime 5
initdead 30
auto_failback off
udp eth0
node node1
node node2
ping node1
deadping 2
- mcedit /etc/ha.d/haresources
- echo -ne "# Automatically generated authkeys file \n auth 1 \n 1 sha1 $(dd if=/dev/urandom count=4 2>/dev/null | md5sum | cut -c1-32) \n" >> /etc/ha.d/authkeys
- chmod 600 /etc/ha.d/authkeys
Копируем настройки на node2
- yum install rsync
- rsync -Hogva /etc/ha.d root@node2:/etc/
- /etc/init.d/heartbeat restart
Смотрим лог
Ошибка
node1 heartbeat: [2231]: CRIT: send_to_all_media: No working comm channels to write to.и запущен общий интерфейс на обоих машинах
Не указан в конфиге /etc/ha.d/ha.cf интерфейс udp eth0
Комментарии
Отправить комментарий