LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: MySQL Replication

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: MySQL Replication
From: Paul Baker <pbaker@xxxxxxxxxxxxxxx>
Date: Fri, 14 Sep 2001 14:38:30 -0500
Michael McConnell wrote:

Paul, you said that I could simply copy the Data from the Slave to a new
Slave, but you must keep in mind, in order to do this MySQL requires that
the Master and Slave data files be IDENTICAL, that means the Master must be
turned off, the data copied to the slave, and then both systems activated.
Resulting in serious downtime.


You only have to make a copy of the data one time when you initial set up your Master the first time. As long as it takes to do this is your downtime:

  kill mysqlpid
  tar cvf mysql-snapshot.tar /path/to/mysql/datadir
  /path/to/mysql/bin/safe_mysqld

Your down time is essentially only how long it takes to copy your 6 gigs of data NOT across a network, but just on the same machine. (which is far less than a myisamchk on the same data) Once that is done, at your leisure you can copy the 6 gigs to the slave while the master is still up and serving requests.

You can then continue to make slave after slave after slave just by copying the original snap shot to each one. The master never has to be taking offline again.

--
=======================================================================
Paul J. Baker                                Internet Systems Developer
pbaker@xxxxxxxxxxxxxxx                                  Where2GetIt.com
phone 847-498-0111x234
fax   847-480-7422
=======================================================================




<Prev in Thread] Current Thread [Next in Thread>