[Pacemaker] MySQL and PostgreSQL on same node with DRBD and floating IPs: suggestions wanted

Andreas Kurz andreas at hastexo.com
Sat Oct 27 16:20:36 EDT 2012


On 10/26/2012 02:00 PM, Denny Schierz wrote:
> 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

this mandatory colocation prevents mysql from running if postgres group
can't run ... ok, if this was your intention ... and you need to
colocate each group with the Master role of its drbd device

> 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 ...

yes, you should ;-)

Regards,
Andreas

-- 
Need help with Pacemaker?
http://www.hastexo.com/now

> 
> 
> So, what might be wrong?
> 
> cu denny
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
> 





-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 222 bytes
Desc: OpenPGP digital signature
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20121027/1384db47/attachment-0003.sig>


More information about the Pacemaker mailing list