I would need log-bin and log-slave-updates enabled on the slave, correct?
So to automate the process it would be better to start both servers
without the Master-host info in the conf file, letting Heartbeat issue the
commands on startup to convert one box to slave. During a fail-over,
heartbeat would take down the master server and issue the "stop slave"
command on the slave.Would deleting the master.info be needed at this
point, or would the stop slave be enough to accept writes?
"In theory, a slave will look at the server-id and will not process
statements where the server-id matches its own server-id"
So is another option to tell the slave to change master to itself?
Thanks,
Scott Tanner
System Administrator
AMI International
"Victor Pendleton" <[EMAIL PROTECTED]>
06/17/2004 01:41 PM
To: "'[EMAIL PROTECTED] '" <[EMAIL PROTECTED]>,
"'[EMAIL PROTECTED] '" <[EMAIL PROTECTED]>
cc:
Subject: RE: Replication - promoting slave to master
Initially you should have set the slave up with log-bin in its my.cnf file
so that it is writing to its own binary logs. In the event that the master
goes down, you should issue a change master on any other slaves so that
they
point to the new master. Redirect all writes to the new master. On the new
master you will want to remove references to the old master. A slave stop
and the removing of the master.info file will work. But you should still
edit the my.cnf file to prevent the machine from trying to reattach at the
next startup. In theory, a slave will look at the server-id and will not
process statements where the server-id matches its own server-id.
-----Original Message-----
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 6/17/04 12:25 PM
Subject: Replication - promoting slave to master
Hello,
I've been lurking about the lists for a few months now, hoping to gain
some knowledge on MySQL's replication features for HA setup. I have a
fairly good understanding of the setup process, but I'm a little
confused
on one points. We are running a 2 node - master-slave setup, and we are
planning on using Heartbeat (from the Linux-HA project) to handle
failover. If the Master fails, the slave will take over permanently, and
the master will be rebuilt as a slave.
What is the procedure for promoting a slave server to master? If the
slave server has the Master-Host, User, and Password set in the conf
file,
will the Stop Slave command be enough to promote it, or will I need to
remove the master.info file as well?
Thank you,
Scott Tanner
System Administrator
AMI International