Linux – MySQL replication using DRBD, distributed lock manager

drbdheartbeatlinuxMySQL

I need to implement Linux-HA configuration in two servers. I've decided to use DRBD for block level replication on both hosts, mainly for MySQL data replication.

As I understand, in DRBD configuration there's always a primary server, others are slaves (which can have slave of their own). Replication is only passed to from masters to slaves, not the other way around.

So what happens, if I have MySQL processes performing writes on both servers at the same time, one of which is master, the other is slave?

The slave can perform writes, but no data is written?

Provided that this configuration will go in conjunction with Heartbeat, it would be Heartbeats' job to ensure that MySQL runs only on the master, but lets assume for the moment, that Heartbeat failed for some reason.

Best Answer

As far as I know, DRBD does partition level replication. The slave does not mount the partition so it cannot write to it. When there's a problem in the master, the slave will mount the partition and start working.

So you can't have both servers writing over the same data.

Related Topic