Table of Contents

Пакет Corosync

Установка

nodeN# apt install corosync

Настройка

Corosync 3 (Debian/Ubuntu)

nodeN# cat /etc/corosync/corosync.conf
totem {
        version: 2
        cluster_name: debian
        crypto_cipher: none
        crypto_hash: none
}

quorum {
       provider: corosync_votequorum
       two_node: 1
}

nodelist {
        node {
                name: node1
                nodeid: 1
                #ring1_addr: 10.M.N.100+X
                ring0_addr: node1
        }
        node {
                name: node2
                nodeid: 2
                #ring1_addr: 10.M.N.200+X
                ring0_addr: node2
        }
}

Перезапуск

nodeN# corosync -t

nodeN# service corosync restart

Отладка

nodeN# corosync-cfgtool -s

nodeN# corosync-cmapctl | grep members

nodeN# grep corosync /var/log/syslog

Дополнительные материалы

Corosync 2 (Debian 9)

nodeN# cat /etc/corosync/corosync.conf
...
                bindnetaddr: 10.M.N.0
...
                mcastaddr: 239.255.1.X
...