Skip to content

Instantly share code, notes, and snippets.

@velenux
Created April 29, 2015 15:32
Show Gist options
  • Save velenux/16e861410e4aea56d367 to your computer and use it in GitHub Desktop.
Save velenux/16e861410e4aea56d367 to your computer and use it in GitHub Desktop.
Configuration for Corosync 2.x + Pacemaker 1.1 2-node cluster on Ubuntu 14.04 LTS
# Please read the corosync.conf.5 manual page
compatibility: whitetank
totem {
# cluster name
cluster_name: coro01
# totem parameters
version: 2
secauth: off
rrp_mode: none
vsftype: none
clear_node_high_bit: yes
# low level network parameters
token: 3000
token_retransmits_before_loss_const: 10
join: 60
consensus: 4000
max_messages: 20
# not documented?
threads: 0
# ring0 interface
interface {
ringnumber: 0
mcastport: 5405
ttl: 1
}
# specify we don't use unicast or anycast
transport: udpu
}
# quorum
quorum {
provider: corosync_votequorum
two_node: 1
}
# nodes
nodelist {
node {
ring0_addr: 10.0.0.1
}
node {
ring0_addr: 10.0.0.2
}
}
# logging
logging {
fileline: off
to_logfile: yes
to_syslog: no
debug: off
logfile: /var/log/cluster/corosync.log
timestamp: on
logger_subsys {
subsys: AMF
debug: off
}
}
amf {
mode: disabled
}
node $id="123456789" node02.cluster.lan
node $id="123456790" node01.cluster.lan
primitive ip_www01 ocf:heartbeat:IPaddr2 \
params ip="10.0.0.9" nic="eth0" cidr_netmask="32" iflabel="www01" \
operations $id="ip_www01-operations" \
op monitor interval="30s" timeout="60s" start-delay="5s" \
meta target-role="Started"
primitive mail_www01 ocf:heartbeat:MailTo \
op monitor interval="60s" timeout="20s" start-delay="30s" \
params email="[email protected]" subject="Migrating cluster coro01"
group www01 ip_www01 mail_www01
location www01_nopref www01 10: node02.cluster.lan
location www01_pref www01 100: node01.cluster.lan
property $id="cib-bootstrap-options" \
dc-version="1.1.10-42f2063" \
cluster-infrastructure="corosync" \
stonith-enabled="false" \
no-quorum-policy="ignore" \
last-lrm-refresh="1429883479"
rsc_defaults $id="rsc-options" \
resource-stickiness="1000"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment