5.14.3. Performing Maintenance on an Entire Dataservice

To perform maintenance on all of the machines within a dataservice, a rolling sequence of maintenance must be performed carefully on each machine in a structured way. In brief, the sequence is as follows

  1. Perform maintenance on each of the current slaves

  2. Switch the master to one of the already maintained slaves

  3. Perform maintenance on the old master (now in slave state)

  4. Switch the old master back to be the master again

A more detailed sequence of steps, including the status of each datasource in the dataservice, and the commands to be performed, is shown in the table below. The table assumes a three-node dataservice (one master, two slaves), but the same principles can be applied to any master/slave dataservice:

Step Description Command host1 host2 host3
1 Initial state   Master Slave Slave
2 Set maintenance policy set policy maintenance Master Slave Slave
3 Shun slave host2 datasource host2 shun Master Shunned Slave
4 Perform maintenance   Master Shunned Slave
5 Validate the host2 server configuration tpm validate Master Shunned Slave
6 Recover the slave host2 back datasource host2 recover Master Slave Slave
7 Ensure the slave ( host2 ) has caught up   Master Slave Slave
8 Shun slave host3 datasource host3 shun Master Slave Shunned
9 Perform maintenance   Master Slave Shunned
10 Validate the host3 server configuration tpm validate Master Slave Shunned
11 Recover slave host3 back datasource host3 recover Master Slave Slave
12 Ensure the slave ( host3 ) has caught up   Master Slave Slave
13 Switch master to host2 switch to host2 Slave Master Slave
14 Shun host1 datasource host1 shun Shunned Master Slave
15 Perform maintenance   Shunned Master Slave
16 Validate the host1 server configuration tpm validate Shunned Master Slave
17 Recover the slave host1 back datasource host1 recover Slave Master Slave
18 Ensure the slave ( host1 ) has caught up   Master Slave Slave
19 Switch master back to host1 switch to host1 Master Slave Slave
20 Set automatic policy set policy automatic Master Slave Slave