I try to use pve-zfsync to replicate a VM, and so far it looks quite good. The VM itself is a Cenos 7 with nginx/apache/mysql web site server.
My concern is, while data VM disks will be replicated nicely, the data in the VM's RAM (mostly MySQL data) won't be transferred so the replicated VM may have database broken if I start the target ("receiving side") VM.
So the question is simple: is there any way I can pass the command inside the VM to tell MySQL to flush buffers to disks just before the disks sync?
P.S. The replication purpose is to keep up-to-date copy of the VM so if one host server go down the VM on second host server can be run soon and serve the site. So to can, poor man HA ).
My concern is, while data VM disks will be replicated nicely, the data in the VM's RAM (mostly MySQL data) won't be transferred so the replicated VM may have database broken if I start the target ("receiving side") VM.
So the question is simple: is there any way I can pass the command inside the VM to tell MySQL to flush buffers to disks just before the disks sync?
P.S. The replication purpose is to keep up-to-date copy of the VM so if one host server go down the VM on second host server can be run soon and serve the site. So to can, poor man HA ).