I have a 2 master and 6 slave MySQL database environment. One master is hot and the other master is considered cold and is just running as a slave. I don't want to do a real master - master where both are replicating from each other. During fail over I want the cold master to start taking the write hits and the failed master to just stop until we can fix and make it a cold master/slave. Is this possible and/or correct?
Thanks
ref - more info about MMM
I prefer dual master with in an active passive setup using LinuxHA (heartbeat). Passive can be used for a different database than the active, so as that the box is not idle. Infrastructure depends on your resources and budget. You can replicate readonly slaves off of either or both of the servers.
But to be quite frank, it sounds like you need to do more research before someone can provide any suitable recommendations. I'd suggest reading "High Performance MySQL," which is one of the best MySQL books out there for advanced architecture.
You could code this logic into your application. For example in your "write" database connect routine, you could attempt to connect to the hot master and if that fails, connect to the cold master.
This should be a comment on your question - but I don't have enough rep to do that yet.
I don't quite understand what your question means. Are you asking "how do I automatically failover from the the failed master to the cold master" ?
If so, what you want is to use either Red Hat Cluster Suite or Pacemaker to create a failover cluster. These clusters consist of two main components: cluster membership services, and resource management. In the resource management component, you would specify which hosts can run your master database. If the current master failed, the survivor would take over.
For your environment, the only actual resource that the cluster would manage would be your VIP.