Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-26-2010, 10:38 PM
|
#1
|
Member
Registered: Jun 2009
Location: India
Distribution: All flavours of linux
Posts: 93
Rep:
|
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.............
|
|
|
01-04-2011, 02:05 AM
|
#2
|
Member
Registered: Mar 2006
Location: Singapore
Distribution: RHEL, CentOS
Posts: 132
Rep:
|
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.
|
|
|
01-04-2011, 11:06 PM
|
#3
|
Member
Registered: Jun 2009
Location: India
Distribution: All flavours of linux
Posts: 93
Original Poster
Rep:
|
Quote:
Originally Posted by novice06
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
|
|
|
01-04-2011, 11:15 PM
|
#4
|
LQ Newbie
Registered: Feb 2010
Posts: 14
Rep:
|
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.
|
|
|
01-04-2011, 11:47 PM
|
#5
|
Member
Registered: Jun 2009
Location: India
Distribution: All flavours of linux
Posts: 93
Original Poster
Rep:
|
Quote:
Originally Posted by rentalsolutions
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
|
|
|
01-06-2011, 09:50 AM
|
#6
|
Member
Registered: Mar 2006
Location: Singapore
Distribution: RHEL, CentOS
Posts: 132
Rep:
|
You can use MySQL Cluster feature. That will be the HA and Load balance.
|
|
|
01-06-2011, 11:04 PM
|
#7
|
Member
Registered: Jun 2009
Location: India
Distribution: All flavours of linux
Posts: 93
Original Poster
Rep:
|
Quote:
Originally Posted by novice06
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
|
|
|
01-06-2011, 11:44 PM
|
#8
|
Member
Registered: Mar 2006
Location: Singapore
Distribution: RHEL, CentOS
Posts: 132
Rep:
|
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.
|
|
|
01-07-2011, 01:25 AM
|
#9
|
Member
Registered: Jun 2009
Location: India
Distribution: All flavours of linux
Posts: 93
Original Poster
Rep:
|
Quote:
Originally Posted by novice06
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
|
|
|
01-07-2011, 01:44 AM
|
#10
|
Member
Registered: Mar 2006
Location: Singapore
Distribution: RHEL, CentOS
Posts: 132
Rep:
|
|
|
|
01-08-2011, 07:13 AM
|
#11
|
Member
Registered: Jun 2009
Location: India
Distribution: All flavours of linux
Posts: 93
Original Poster
Rep:
|
Quote:
Originally Posted by novice06
|
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
|
|
|
01-09-2011, 05:06 PM
|
#12
|
Member
Registered: Feb 2009
Posts: 68
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 08:30 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|