A
A
AstonMartin2010-11-21 11:49:19
MySQL
AstonMartin, 2010-11-21 11:49:19

Will MyISAM crash during synchronization?

Now I synchronize the databases with the remote server by stopping the muscle and starting rsync. But the bases are growing and the downtime is growing with them.
The question is how likely is it to get broken tables if you do not stop the muscle for a synchronization period? And if at first to make LOCK TABLES? And then run the check. From activity to base on 99% SELECTs.

PS. I know very well about dumps and about replication and actively use them, but in this case it is unreasonably difficult.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
P
pwlnw, 2010-11-21
@pwlnw

FLUSH TABLES WITH READ LOCK;
Only this construction globally blocks all write operations to files on the server. SELECTs work.
The reasons for such a decision are not very clear. Why not use replication or a simple dump?

C
casey, 2010-11-21
@casey

By synchronization, you mean copying - because now you have it only in one direction - from a remote server to yours.
You can use mysqldump instead of rsync, then gzip, scp on the remote server and mysql < dump.sql on the local one - it will be the same, but the remote server will hardly be idle (only the lag will remain while the dump is being executed).

H
helios, 2010-11-21
@helios

Why such a perversion with rsync? Why didn't replication work?
In any case, you can use mysqlhotcopy to copy table files while the server is running, and send these copies to the slave using rsync.

@
@mgyk, 2010-11-21
_

There is another option - to use LVM and snapshots. There will be no downtime, though, while the snapshot is being raised, the speed of the disk will drop.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question