Hi Dave!
What does it mean to be a master server when there is only one machine?
Do you mean you want it to be able to do updates and send the changes
back to the other when the other comes back up?
MySQL has (at least) 2 ways of doing replication. One is master/slave
where everything that changes on a master is copied to a slave.
I've got an application set up where most of the operations are
read-only, so if the master is down we just assume that updates
cannot be done. I don't think MySQL reliably supports swapping the
master/slave relationship with this kind of replication.
OK, but You can configure both servers to replicate in both directions
but you can only use one at the same moment.
A replicate to B and B replicate to A, but you can only use A. When A
goes down, you can use B as a master because when A goes up it will be
replicating all again and it will be up to date soon. But in this moment
you can only use B until A was up to date. When A is updated you can use
it again but You must leave B as slave now... In my problem I only want
solve the first step, A -> goes down -> Heartbeat detects the problem ->
Heartbeat execute the scripts to make B a master -> B is a master with
the same VIP as A (and now the applications run OK!!). The second step
is to automate this second change (this is a bit more difficult than the
first change..)
The other way MySQL does replication is called MySQL cluster.
With that method the various servers are peers and either one can do
updates and they get automatically copied to the others even as the
servers leave and join the cluster. Maybe you need to use this method.
MySQL is a "bit" complex than replication and it requires more hardware
than replication. (Too much memory for a large database or too much
machines!! I have a about 130 GB database. It isn't large for MySQL but
for me could be...)
Now I am documenting more about Heartbeat V2 and I am trying to solve
some basic steps. Then I think it will be more easy.
Regards...
- Dave
On Tue, Jun 26, 2007 at 01:36:17PM -0400, Madison Kelly wrote:
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
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems