6.13.3. Performing Maintenance on an Entire Dataservice

To perform maintenance on all of the machines within a replicator service, 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 Replicas

  2. Switch the Primary to one of the already maintained Replicas

  3. Perform maintenance on the old Primary (now in Replica state)

  4. Switch the old Primary back to be the Primary 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 Primary, two Replicas), but the same principles can be applied to any Primary/Replica dataservice:

Step Description Command host1 host2 host3
1 Initial state   Primary Replica Replica
2 Set the Replica host2 offline trepctl -host host2 offline Primary Offline Replica
3 Perform maintenance   Primary Offline Replica
4 Validate the host2 server configuration tpm validate Primary Offline Replica
5 Set Replica host2 online trepctl -host host2 online Primary Replica Replica
6 Ensure the Replica (host2) has caught up trepctl -host host2 status Primary Replica Replica
7 Set the Replica host3 offline trepctl -host host3 offline Primary Replica Offline
8 Perform maintenance   Primary Replica Offline
9 Validate the host3 server configuration tpm validate Primary Replica Offline
10 Set the Replica host3 online trepctl -host host3 online Primary Replica Replica
11 Ensure the Replica (host3) has caught up trepctl -host host3 status Primary Replica Replica
12 Switch Primary to host2 See Section 6.11, “Switching Primary Hosts” Replica Primary Replica
13 Set the Replica host1 trepctl -host host1 offline Offline Primary Replica
14 Perform maintenance   Offline Primary Replica
15 Validate the host1 server configuration tpm validate Offline Primary Replica
16 Set the Replica host1 online trepctl -host host3 online Replica Primary Replica
17 Ensure the Replica (host1) has caught up trepctl -host host1 status Primary Replica Replica
18 Switch Primary back to host1 See Section 6.11, “Switching Primary Hosts” Primary Replica Replica