This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
пакет_corosync [2019/09/05 14:01] val [Настройка] |
пакет_corosync [2022/01/29 20:47] val [Corosync 3 (Debian 10/11)] |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Пакет Corosync ====== | ||
+ | * Corosync provides reliable communication between nodes, manages cluster membership and determines quorum | ||
+ | * [[https://www.digitalocean.com/community/tutorials/how-to-create-a-high-availability-setup-with-corosync-pacemaker-and-floating-ips-on-ubuntu-14-04|How To Create a High Availability Setup with Corosync, Pacemaker, and Floating IPs on Ubuntu 14.04]] | ||
+ | |||
+ | |||
+ | ===== Установка ===== | ||
+ | <code> | ||
+ | nodeN# apt install corosync | ||
+ | </code> | ||
+ | |||
+ | ===== Настройка ===== | ||
+ | |||
+ | |||
+ | |||
+ | ==== Corosync 3 (Debian 10/11) ==== | ||
+ | |||
+ | <code> | ||
+ | nodeN# cat /etc/corosync/corosync.conf | ||
+ | </code><code> | ||
+ | ... | ||
+ | quorum { | ||
+ | provider: corosync_votequorum | ||
+ | two_node: 1 | ||
+ | } | ||
+ | |||
+ | nodelist { | ||
+ | node { | ||
+ | name: node1 | ||
+ | nodeid: 1 | ||
+ | ring0_addr: 10.M.N.100+X | ||
+ | #ring0_addr: node1 | ||
+ | } | ||
+ | node { | ||
+ | name: node2 | ||
+ | nodeid: 2 | ||
+ | ring0_addr: 10.M.N.200+X | ||
+ | #ring0_addr: node2 | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </code> | ||
+ | |||
+ | ==== Перезапуск ==== | ||
+ | <code> | ||
+ | nodeN# corosync -t | ||
+ | |||
+ | nodeN# service corosync restart | ||
+ | </code> | ||
+ | |||
+ | ===== Отладка ===== | ||
+ | |||
+ | <code> | ||
+ | nodeN# corosync-cfgtool -s | ||
+ | |||
+ | nodeN# corosync-cmapctl | grep members | ||
+ | |||
+ | nodeN# grep corosync /var/log/syslog | ||
+ | </code> | ||
+ | |||
+ | ===== Дополнительные материалы ===== | ||
+ | |||
+ | ==== Corosync 2 (Debian 9) ==== | ||
+ | |||
+ | <code> | ||
+ | nodeN# cat /etc/corosync/corosync.conf | ||
+ | </code><code> | ||
+ | ... | ||
+ | bindnetaddr: 10.M.N.0 | ||
+ | ... | ||
+ | mcastaddr: 239.255.1.X | ||
+ | ... | ||
+ | </code> |