This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
пакет_heartbeat [2021/10/22 11:15] val [Debian/Ubuntu] |
пакет_heartbeat [2022/03/17 12:11] (current) val [Отладка] |
||
|---|---|---|---|
| Line 11: | Line 11: | ||
| <code> | <code> | ||
| root@nodeN:~# apt install heartbeat | root@nodeN:~# apt install heartbeat | ||
| - | |||
| - | root@nodeN:~# systemctl enable heartbeat | ||
| debian11# cat /etc/rc.local | debian11# cat /etc/rc.local | ||
| Line 43: | Line 41: | ||
| nodeN# cat ha.cf | nodeN# cat ha.cf | ||
| </code><code> | </code><code> | ||
| - | #bcast em2 | + | #bcast eth0 |
| - | bcast eth2 | + | #bcast eth2 |
| #ucast eth1 172.16.1.Y | #ucast eth1 172.16.1.Y | ||
| #ucast eth2 slave | #ucast eth2 slave | ||
| Line 68: | Line 66: | ||
| nodeN# ls /etc/ha.d/resource.d/ | nodeN# ls /etc/ha.d/resource.d/ | ||
| + | |||
| + | node1# /etc/ha.d/resource.d/IPaddr2 192.168.X.10/32/eth0 start | ||
| + | |||
| + | node1# /etc/ha.d/resource.d/IPaddr2 192.168.X.10/32/eth0 stop | ||
| nodeN# cat haresources | nodeN# cat haresources | ||
| Line 81: | Line 83: | ||
| В freebsd использовать IPaddr, в Linux IPaddr2 (иначе может привязать адрес не к тому интерфейсу) | В freebsd использовать IPaddr, в Linux IPaddr2 (иначе может привязать адрес не к тому интерфейсу) | ||
| - | ===== Запуск ===== | + | ===== Запуск/Остановка ===== |
| ==== Debian/Ubuntu ==== | ==== Debian/Ubuntu ==== | ||
| <code> | <code> | ||
| - | root@nodeN:~# service heartbeat start | + | root@nodeN:~# systemctl enable heartbeat |
| + | |||
| + | root@nodeN:~# systemctl start heartbeat | ||
| + | |||
| + | root@nodeN:~# systemctl disable heartbeat | ||
| + | |||
| + | root@nodeN:~# systemctl stop heartbeat | ||
| </code> | </code> | ||
| Line 97: | Line 105: | ||
| ===== Отладка ===== | ===== Отладка ===== | ||
| <code> | <code> | ||
| + | nodeN# tail -f /var/log/ha-debug | ||
| + | |||
| nodeN# cat /var/log/ha-debug | grep -v ERR | grep -v autotoken | nodeN# cat /var/log/ha-debug | grep -v ERR | grep -v autotoken | ||