[Pacemaker] dual drbd+active/active mysql is that possible?

Arnold Krille arnold at arnoldarts.de
Tue Oct 8 15:56:27 EDT 2013


On Sun, 6 Oct 2013 02:08:24 +0800 Gray Wen Wen
<deutschland.gray at gmail.com> wrote:
> Hi all,
> now I am trying to configure a dual DRBD with mysql
> i wanna use active/active mode without any loadbalance.
> so my drbd is primary/primary on node1 and node2.
> the mount point is /mysql
> and i configure everything for mysql
> then when I start the pacemaker service
> the mysql can only be active on one node.
> and another server show mysql startup error.
> 
> I tried few times...so here is my question,
> whether because of I set primay/primary drbd so actually the two
> nodes hold the same shared storage (/mysql folder on two nodes)
> so if one node start mysql that means it locks the folder /mysql
> and another node can not continue use this shared storage.
> 
> does mysql active/active mode must use loadblance or something else?

How do you think mysql (or any other database) works?
What happens when a row is added to a table? Now think about making
mysql sync that process (adding a row to a table) across several
instances, regardless whether these are all read-write masters or some
just read-only slaves. Yes, this can be made to work _if_ each
mysql-instance has its own disk-space for the tables. But these
mysql-instances will get horribly confused when someone else modifies
their disk-space without them knowing. Even if that "someone else" is
another mysql-instance meaning to do the right thing. There is a reason
why the second instance sees the tables as "locked".

Long story short: Don't do what you are trying to do.
Either use drbd in active-passive and run _one_ mysql-instance on the
drbd-master. Or run one mysql instance with its own disk-space on each
node and promote/demote the write-master/read-only-slave with the
mysql-RA.

Good luck,

Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20131008/38a8ecdd/attachment-0003.sig>


More information about the Pacemaker mailing list