[ClusterLabs] Retrofit MySQL with pacemaker?
Niels Kobschätzki
niels at kobschaetzki.net
Sun May 3 07:48:46 EDT 2020
On 20/05/03 14:40, Strahil Nikolov wrote:
>On May 3, 2020 11:47:35 AM GMT+03:00, "Niels Kobschätzki" <niels at kobschaetzki.net> wrote:
>>Hi,
>>
>>I have here several master/slave-MySQL-instanced which I want to
>>retrofit with corosync/Pacemaker while they are in production and I
>>want to do it with minimal downtime.
>>Is that even possible?
>>
>>I would set up a 2-node corosync-cluster on both. Then I have the
>>problem that there is already a virtual IP and I want to continue using
>>it. Do I deco figure the VIP on the current active master, then
>>configure the resource? Or is there a better way. How would I go in
>>configuring the MySQL-resource?
>>
>>Did anyone here did something like that before or do you always start
>>with a new setup (which begs the question how do you get the data from
>>the old to the new - dump it out or can you attach the new one to the
>>old one somehow and then switch at a certain point?)?
>>
>
>I believe that you can do it even without downtime but it will be hard to do it.
>
>Most probably something like this can work, but I have never done it:
>1. Setup and install the cluster without the resources
>2. Set the cluster in maintenance
>3. Either use the shadow cib or pcs counterpart command to define the whole cluster
>4. Load the shadow cib from the file
>5. Run a crm_simulate to verify the cluster's actions
>6. Remove the maintenance
>
>A more safer approach is to create the cluster with the replication in advance and then either use replication to transfer the data or use an export/import for that purpose.
Thanks a lot.
>
>If you have a spare pair of systems , you can try the first approach (building a fresh cluster and configure it while the DB is running).
Yeah, I probably set up a test-cluster in VMs beforehand with a
sakila-database or so.
Best regards
Niels
More information about the Users
mailing list