LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-26-2010, 10:38 PM   #1
sushantchawla2005
Member
 
Registered: Jun 2009
Location: India
Distribution: All flavours of linux
Posts: 93

Rep: Reputation: 14
Question MySQL Cluster with Heartbeat


Hello All Linux Experts,

I have setup a MySQL High Availability Cluster with two nodes using DRBD & Heartbeat. I have successfully installed the cluster but one question which is still not solved is that Heartbeat monitors failover of network or server failure, etc.

What will happen if MySQL service gets stopped or do not start. This heartbeat-DRBD cluster does not take any action on that part.

Now I want to enable this feature too which also monitors MySQL service. I have gone through MON help on web but could not find out any good step by step tutorial.

Please help me.............
 
Old 01-04-2011, 02:05 AM   #2
novice06
Member
 
Registered: Mar 2006
Location: Singapore
Distribution: RHEL, CentOS
Posts: 132

Rep: Reputation: 23
If I am not wrong, heartbeat is not monitor the service (MySQL). Heartbeat will only check the two physical servers. If primary go down, all the services at primary will take over by slave. ( check via control channel - whatever you configure at /etc/ha.d/ha.cf )
Since your data (data files of mysql /var/lib/mysql) is put it on DRBD, your redundant data is identical.
But let say your Mysql database has load issue, heartbeat will not take care about that.
 
Old 01-04-2011, 11:06 PM   #3
sushantchawla2005
Member
 
Registered: Jun 2009
Location: India
Distribution: All flavours of linux
Posts: 93

Original Poster
Rep: Reputation: 14
Quote:
Originally Posted by novice06 View Post
If I am not wrong, heartbeat is not monitor the service (MySQL). Heartbeat will only check the two physical servers. If primary go down, all the services at primary will take over by slave. ( check via control channel - whatever you configure at /etc/ha.d/ha.cf )
Since your data (data files of mysql /var/lib/mysql) is put it on DRBD, your redundant data is identical.
But let say your Mysql database has load issue, heartbeat will not take care about that.
Thanks for the reply. Yes Heartbeat monitors the two physical servers for network outage, power failure, etc. It doesn't care about the services running on the two servers. Apart from the failover of any server there are chances that sometimes a service may fail too. I also want to have the high availability of MySQL service. In any case if MySQL service gets down the other server should switch on its MySQL service & start serving the users requests on the virtual IP which is taken from the other server.

Regds
Sushant Chawla
 
Old 01-04-2011, 11:15 PM   #4
rentalsolutions
LQ Newbie
 
Registered: Feb 2010
Posts: 14

Rep: Reputation: 0
MySQL Cluster with Heartbeat

Heartbeat will only check the two physical servers. If primary go down, all the services at primary will take over by slave.
 
Old 01-04-2011, 11:47 PM   #5
sushantchawla2005
Member
 
Registered: Jun 2009
Location: India
Distribution: All flavours of linux
Posts: 93

Original Poster
Rep: Reputation: 14
Quote:
Originally Posted by rentalsolutions View Post
Heartbeat will only check the two physical servers. If primary go down, all the services at primary will take over by slave.
Yes I know, that's why I am asking for high availability solution which can give me high availability for services on the server too.

Regds
Sushant Chawla
 
Old 01-06-2011, 09:50 AM   #6
novice06
Member
 
Registered: Mar 2006
Location: Singapore
Distribution: RHEL, CentOS
Posts: 132

Rep: Reputation: 23
You can use MySQL Cluster feature. That will be the HA and Load balance.
 
Old 01-06-2011, 11:04 PM   #7
sushantchawla2005
Member
 
Registered: Jun 2009
Location: India
Distribution: All flavours of linux
Posts: 93

Original Poster
Rep: Reputation: 14
Quote:
Originally Posted by novice06 View Post
You can use MySQL Cluster feature. That will be the HA and Load balance.
I could've used MySQL cluster but currently it doesn't support InnoDB tables, that's why I am looking for alternatives.

Regds
Sushant Chawla
 
Old 01-06-2011, 11:44 PM   #8
novice06
Member
 
Registered: Mar 2006
Location: Singapore
Distribution: RHEL, CentOS
Posts: 132

Rep: Reputation: 23
In this case, you may want you use combination of HA, DRBD and monit.
monit is monitoring daemon of services. You can monitor MySQL and send email alert, trigger certain behavior like restart MySQL server.
 
Old 01-07-2011, 01:25 AM   #9
sushantchawla2005
Member
 
Registered: Jun 2009
Location: India
Distribution: All flavours of linux
Posts: 93

Original Poster
Rep: Reputation: 14
Quote:
Originally Posted by novice06 View Post
In this case, you may want you use combination of HA, DRBD and monit.
monit is monitoring daemon of services. You can monitor MySQL and send email alert, trigger certain behavior like restart MySQL server.
Thanks a lot for this good suggestion. I visited Monit website & it looks like we can configure it in our scenario. I am searching for a direct documentation for MySQL with Monit, do you know any direct link for my requirement??

Regds
Sushant Chawla
 
Old 01-07-2011, 01:44 AM   #10
novice06
Member
 
Registered: Mar 2006
Location: Singapore
Distribution: RHEL, CentOS
Posts: 132

Rep: Reputation: 23
For Monit setup
http://www.howtoforge.net/server-mon...andriva-2010.0

You can also try with popular project mon. It is also very popular project.
http://www.oreillynet.com/pub/a/data...er.html?page=3

Cheer
 
Old 01-08-2011, 07:13 AM   #11
sushantchawla2005
Member
 
Registered: Jun 2009
Location: India
Distribution: All flavours of linux
Posts: 93

Original Poster
Rep: Reputation: 14
Quote:
Originally Posted by novice06 View Post
For Monit setup
http://www.howtoforge.net/server-mon...andriva-2010.0

You can also try with popular project mon. It is also very popular project.
http://www.oreillynet.com/pub/a/data...er.html?page=3

Cheer
Yeah the docs look good. I will surely give both a try. Thanks again for the suggestions, I will update you with the results soon.

Regds
Sushant Chawla
 
Old 01-09-2011, 05:06 PM   #12
struct
Member
 
Registered: Feb 2009
Posts: 68

Rep: Reputation: 10
sushantchawla2005,
We have a similar setup with DRBD and Heartbeat but no service monitoring service. I've been looking at the monit recently but haven't had a chance to implement it in our production environment. I'm looking forward to what you find out.
 
  


Reply


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
Cluster Heartbeat IwantLINUX Linux - Server 1 09-05-2010 05:43 AM
Heartbeat Cluster saran_redhat Linux - Newbie 2 11-14-2009 05:22 AM
heartbeat cluster help ufmale Linux - Server 3 05-23-2008 07:16 PM
heartbeat cluster configuration problem!!!!!! raklo Linux - Software 0 01-31-2008 05:43 AM
heartbeat cluster on different subnets blanks Linux - Networking 1 04-03-2007 03:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:30 AM.

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