On 28 Jun 2007, at 09:02, Adrian Chapela wrote:

Madison Kelly escribió:
Adrian Chapela wrote:
Hello,

I am trying to make a MySQL system with high availability. One Master server and one slave server wich will assume the master functions when the master server goes down.

My problem is to make a rule for the execution in slave server when master server goes down. When master server goes down, the slave server assume the VIP and then must execute a script to test something and then the server can go up but it can't go up until the first test has finished.

Can you say me how to write this rule ??

Thank you!

Can you give a bit more details on what you've gotten setup so far? Are you using heartbeat v2? Are you using the /etc/ha.d/ haresources file or CRM? Are you using DRBD?

In my case (still working on DRBD issues) my ha.cf file is:

http://tle-bu.org/misc/ha.cf.vash

And my haresources file is:

http://tle-bu.org/misc/haresources.vash

Do note though that the haresources file above may be broken. As I mentioned, I am currently working on a DRBD problem. However, the commented out line (second from the bottom) works fine.

If you can provide more details and/or ask specific questions I might be able to help you more. At the moment though, I'm still learning as well, though I have gotten past a few of the early trip-ups.

Madi
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems



hello,

As Madi says, how is data presented to your server ? If DRBD then the above will be ideal. We're using SAN so we're doing the following :

mysql.conf file kept under /etc/ha.d/conf on all nodes.

Heartbeat configured with a single group per MySQL instance with the following:
        IPaddr(2)
Mysql, A local standardised crm resource script (v. similar to examples provided, happy to hand this over if helpful.
        SAN crm with mount point and dev details

and a stonith resource so that if something bad does occur the node is restarted, preventing the SAN being used in 2 places at once.

Configured this way if the node goes away the whole group is relocated with the ip and associated Mysql instance and its storage.

NB Slave mysql caveat on the config side. Do not use a hostname for either the logs or access control. Logs, use a generic name foo.log) and ACL use the VIP. Otherwise interesting things happen on failover.

Good luck

Pete

--
The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to