Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 12-21-2010, 08:00 AM   #1
Registered: Feb 2010
Posts: 43

Rep: Reputation: 0
MySQL HA-cluster with DRBD, Pacemaker and Corosync


I'm setting up a HA-cluster with two Debian Lenny nodes. They both run on two separate VMware ESX-servers.

I have DRBD configured properly, one Primary and one Secondary and it sync just fine.
I use Corosync and Pacemaker for the cluster and I have setup a failover IP that also works just fine using this guide:

Now I want to implement MySQL and DRBD.
I found a guide on: and one on DRBDs site:

But they don't tell me why and what I'm doing. I want to have 100% control of the cluster so I will know exactly how it's set up. I can't either find any documentation about the resources they use in the guides..

Is there anyone that can point me in the right direction to some documentation or maybe tell me what I have to do or what this config does:

crm(live)configure# primitive drbd_mysql ocf:linbit:drbd \
                    params drbd_resource="mysql" \
                    op monitor interval="15s"
crm(live)configure# ms ms_drbd_mysql drbd_mysql \
                    meta master-max="1" master-node-max="1" \
                         clone-max="2" clone-node-max="1" \
crm(live)configure# primitive fs_mysql ocf:heartbeat:Filesystem \
                    params device="/dev/drbd/by-res/mysql" directory="/var/lib/mysql" fstype="ext3"
crm(live)configure# primitive ip_mysql ocf:heartbeat:IPaddr2 \
                    params ip="" nic="eth0"
crm(live)configure# primitive mysqld lsb:mysqld
crm(live)configure# group mysql fs_mysql ip_mysql mysqld
crm(live)configure# colocation mysql_on_drbd inf: mysql ms_drbd_mysql:Master
crm(live)configure# order mysql_after_drbd inf: ms_drbd_mysql:promote mysql:start
Old 01-27-2012, 08:29 PM   #2
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358

Rep: Reputation: 31

I plan on trying out a similar project myself soon on fc13.

I found this guide which goes into a good amount of detail around what is going on during the configuration process - this is the one i plan on following.

Not sure if this helps but here:

Old 01-28-2012, 05:27 AM   #3
Registered: Feb 2010
Posts: 43

Original Poster
Rep: Reputation: 0
Wow thanks, that document actually looks really nice! I will have a look at it this weekend when I get some time.
Thanks a lot for sharing!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Set Up An Active/Passive PostgreSQL Cluster With Pacemaker, Corosync, And DRBD (CentOS LXer Syndicated Linux News 0 11-17-2010 08:40 AM
Device already mounted or mount point busy with CentOS/corosync/pacemaker/DRBD aschoessler Linux - Server 1 04-02-2010 08:11 AM
redhat cluster, gfs, drbd, iscsi storage server aclhkaclhk Linux - Software 1 12-15-2009 04:59 PM
LXer: Installation And Setup Guide For DRBD, OpenAIS, Pacemaker + Xen On OpenSUSE 11. LXer Syndicated Linux News 0 08-19-2009 12:50 PM
High availability Samba cluster DRBD + Heartbeat djalex Linux - Networking 3 09-05-2006 01:14 PM

All times are GMT -5. The time now is 12:25 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration