have two machines that are carped and have mysql databases
on them. one
machine is the mysql master and the other a slave that
replicates the
master. this keeps things ready for what i've just
experienced: mysql
master machine goes down. now that a master failure has
occurred, i am
not certain of the best path for bringing the master back
online so that
it's synced with the slave.
to bring the master back online correctly i see the
following as an
obvious, but laborious, path: (1) restart master and
increase advskew on
the carp interface so the slave stays MASTER (2) edit config
files and
restart mysql on both machines so that the slave is now the
master and
vice versa for the original master (3) initiate slave
replication onto
the original master (4 - optional) decrease advskew on the
original
master machine so that it takes over (5 - optional) restart
mysql on
both machines, swapping the master and slave configs. the
optional steps
are only if restoring the original master as master is
desired.
if there is another way to do what i've described above that
doesn't
involve downtime for mysql or is more easily automated,
please advise.
cheers,
jake
|