To perform maintenance on the dataservice, for example to update the MySQL
configuration file, can be achieved in a similar sequence to that shown in
Section 5.14, “Performing Database or OS Maintenance”, except that you must also
restart the corresponding Tungsten Replicator service after the main
Continuent Tungsten service has been placed back online.
For example, to perform maintenance on the
Put the dataservice into
MAINTENANCE mode. This
ensures that Continuent Tungsten will not attempt to automatically recover
cctrl [east]> set policy maintenance
Shun the first slave datasource so that maintenance can be performed
on the host.
cctrl [east]> datasource east1 shun
Perform the updates, such as updating
my.cnf, changing schemas, or
performing other maintenance.
If MySQL configuration has been modified, restart the MySQL service:
cctrl [east]> service host/mysql restart
Bring the host back into the dataservice:
cctrl [east]> datasource host recover
Perform a switch so that the master becomes a slave and can then be
shunned and have the necessary maintenance performed:
cctrl [east]> switch
Repeat the previous steps to shun the host, perform maintenance, and
then switch again until all the hosts have been updated.
Set the policy back to automatic:
cctrl> set policy automatic
On each host in the other region, manually restart the
Tungsten Replicator service, which will have gone offline when MySQL was
shell> /opt/replicator/tungsten/tungsten-replicator/bin/trepctl -host host -service east online
18.104.22.168. Fixing Replication Errors
In the event of a replication fault, the standard
cctrl, trepctl and other utility
commands in Chapter 8, Command-line Tools can be used to bring the
dataservice back into operation. All the tools are safe to use.
If you have to perform any updates or modifications to the stored MySQL
data, ensure binary logging has been disabled using:
mysql> SET SESSION SQL_LOG_BIN=0;
Before running any commands. This prevents statements and operations
reaching the binary log so that the operations will not be replicated to