LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   MySQL HA-cluster with DRBD, Pacemaker and Corosync (http://www.linuxquestions.org/questions/linux-server-73/mysql-ha-cluster-with-drbd-pacemaker-and-corosync-851591/)

Patric.F 12-21-2010 09:00 AM

MySQL HA-cluster with DRBD, Pacemaker and Corosync
 
Hi,

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: http://www.clusterlabs.org/wiki/Debian_Lenny_HowTo

Now I want to implement MySQL and DRBD.
I found a guide on: http://www.clusterlabs.org/wiki/DRBD_MySQL_HowTo and one on DRBDs site: http://www.drbd.org/users-guide/s-pa...d-service.html

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:

Code:

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" \
                        notify="true"
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="10.9.42.1" 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

Thanks,
-Patric

-=Graz=- 01-27-2012 09:29 PM

Hi,

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: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf

Cheers,
G

Patric.F 01-28-2012 06:27 AM

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! :)


All times are GMT -5. The time now is 09:28 AM.