Corosync Setup

The steps is for Debian Squeeze.

Setup Corosync config

Suppose the nodes have 2 interface:

  • one for general traffic, segment 192.168.0.0
  • one for dedicated drbd sync, segment 10.0.0.0

Make /etc/corosync/corosync.conf:

corosync.conf
# Please read the corosync.conf.5 manual page
compatibility: whitetank

aisexec {
        # Run as root - this is necessary to be able to manage resources with Pacemaker
        user: root
        group: root
}

service {
        # Load the Pacemaker Cluster Resource Manager
        ver: 0
        name: pacemaker
        use_mgmtd: yes
        use_logd: yes
}

totem {
        version: 2
        secauth: off
        threads: 0
        rrp_mode: passive

        interface {
                ringnumber: 0
                bindnetaddr: 10.0.0.0
                mcastaddr: 226.94.1.1
                mcastport: 5405
        }
        interface {
                ringnumber: 1
                bindnetaddr: 192.168.0.0
                mcastaddr: 226.94.1.1
                mcastport: 5405
        }
}

logging {
        fileline: off
        to_stderr: yes
        to_logfile: yes
        to_syslog: yes
        logfile: /var/log/corosync/corosync.log
        debug: off
        timestamp: on
        logger_subsys {
                subsys: AMF
                debug: off
        }
}

amf {
        mode: disabled
}

Copy this config file to all nodes.

Generate Authkey

The authkey prevents unauthorized machines from joining the cluster.

corosync-keygen

Copy the resulting key file /etc/corosync/authkey to all nodes.

The secauth option must also be set to on.

Fix Corosync shutdown problem

Reference: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=556533

Edit /etc/init.d/corosync, change the retry timeout to much longer. Example, 600 seconds:

do_stop()
{
        ...
        start-stop-daemon --stop --quiet --signal=QUIT --retry=600 --pidfile $PIDFILE

Repeat this section on all nodes.


ha/setup_cluster_infrastructure_with_corosync.txt · Last modified: 2010-08-21 15:10 by admin
Back to top
GNU Free Documentation License 1.3
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0