[Pacemaker] MySQL and PostgreSQL on same node with DRBD and floating IPs: suggestions wanted
Denny Schierz
linuxmail at 4lin.net
Fri Oct 26 12:00:25 UTC 2012
hi,
I'm playing with Pacemaker from Debian squeeze-backports to get failover running, for PostgreSQL and MySQL(mariaDB) on the same node with two DRBD resources and two floating VIPs. It seems to be working, the failover works, but I want some suggestions, if my config is O.K, or what I should do better, so any suggestions are welcome :-)
corosync and drbd communicates over a dedicated interface (eth1 / eth2) ...
here we are:
======
root at SQLNODE-02:~# crm configure show
node SQLNODE-01
node SQLNODE-02
primitive drbd-mysql ocf:linbit:drbd \
params drbd_resource="mysql" \
op monitor interval="29s" role="Master" \
op monitor interval="31s" role="Slave"
primitive drbd-postgres ocf:linbit:drbd \
params drbd_resource="postgres" \
op monitor interval="29s" role="Master" \
op monitor interval="31s" role="Slave"
primitive mysql-fs ocf:heartbeat:Filesystem \
params device="/dev/drbd1" directory="/var/lib/mysql" fstype="ext4"
primitive mysql-ip ocf:heartbeat:IPaddr2 \
params ip="192.168.1.10" nic="eth0" cidr_netmask="24" \
op monitor interval="10s"
primitive mysqld lsb:mysql
primitive postgres-fs ocf:heartbeat:Filesystem \
params device="/dev/drbd0" directory="/var/lib/postgresql" fstype="ext4"
primitive postgres-ip ocf:heartbeat:IPaddr2 \
params ip="192.168.1.11" nic="eth0" cidr_netmask="24" \
op monitor interval="10s"
primitive postgresql ocf:heartbeat:pgsql \
params pgctl="/usr/lib/postgresql/9.1/bin/pg_ctl" psql="/usr/lib/postgresql/9.1/bin/psql" pgdata="/var/lib/postgresql/9.1/main/" logfile="/var/log/postgresql/postgresql-9.1-main.log" \
op monitor interval="30" timeout="30" depth="0"
group mysql mysql-fs mysql-ip mysqld
group postgres postgres-fs postgres-ip postgresql
ms ms-drbd-mysql drbd-mysql \
meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"
ms ms-drbd-postgres drbd-postgres \
meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"
location master-prefer-node1 postgres 50: SQLNODE-01
colocation all-db-ips inf: mysql postgres
order mysql-after-drbd inf: ms-drbd-mysql:promote mysql:start
order postgres-after-drbd inf: ms-drbd-postgres:promote postgres:start
property $id="cib-bootstrap-options" \
dc-version="1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff" \
cluster-infrastructure="openais" \
expected-quorum-votes="2" \
no-quorum-policy="ignore" \
stonith-enabled="false" \
default-resource-stickiness="1" \
last-lrm-refresh="1351243858"
=================
stonith is missing .. I should definitely enable it ...
So, what might be wrong?
cu denny
More information about the Pacemaker
mailing list