To remove a datasource from an existing deployment there are two primary stages, removing it from the active service, and then removing it from the active configuration.
For example, to remove host6 from a
service:
Check the current service state:
[LOGICAL] /alpha > ls
COORDINATOR[host1:AUTOMATIC:ONLINE]
ROUTERS:
+----------------------------------------------------------------------------+
|connector@host1[11401](ONLINE, created=17, active=0) |
|connector@host2[7998](ONLINE, created=0, active=0) |
|connector@host3[31540](ONLINE, created=0, active=0) |
|connector@host4[26829](ONLINE, created=27, active=1) |
+----------------------------------------------------------------------------+
DATASOURCES:
+----------------------------------------------------------------------------+
|host1(slave:ONLINE, progress=373, latency=0.000) |
|STATUS [OK] [2014/02/12 12:48:14 PM GMT] |
+----------------------------------------------------------------------------+
| MANAGER(state=ONLINE) |
| REPLICATOR(role=slave, master=host6, state=ONLINE) |
| DATASERVER(state=ONLINE) |
| CONNECTIONS(created=30, active=0) |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
|host2(slave:ONLINE, progress=373, latency=1.000) |
|STATUS [OK] [2014/01/24 05:02:34 PM GMT] |
+----------------------------------------------------------------------------+
| MANAGER(state=ONLINE) |
| REPLICATOR(role=slave, master=host6, state=ONLINE) |
| DATASERVER(state=ONLINE) |
| CONNECTIONS(created=0, active=0) |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
|host3(slave:ONLINE, progress=373, latency=1.000) |
|STATUS [OK] [2014/02/11 03:17:08 PM GMT] |
+----------------------------------------------------------------------------+
| MANAGER(state=ONLINE) |
| REPLICATOR(role=slave, master=host6, state=ONLINE) |
| DATASERVER(state=ONLINE) |
| CONNECTIONS(created=0, active=0) |
+----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
|host6(master:ONLINE, progress=373, THL latency=0.936) |
|STATUS [OK] [2014/02/12 12:39:52 PM GMT] |
+----------------------------------------------------------------------------+
| MANAGER(state=ONLINE) |
| REPLICATOR(role=master, state=ONLINE) |
| DATASERVER(state=ONLINE) |
| CONNECTIONS(created=14, active=1) |
+----------------------------------------------------------------------------+
Switch to MAINTENANCE policy
mode:
[LOGICAL] /alpha > set policy maintenance
policy mode is now MAINTENANCESwitch to administration mode:
[LOGICAL] /alpha > adminRemove the node from the active service using the rm command. You will be warned that this is an expert command and to confirm the operation:
[ADMIN] /alpha > rm host6
WARNING: This is an expert-level command:
Incorrect use may cause data corruption
or make the cluster unavailable.
Do you want to continue? (y/n)> ySwitch back to logical mode:
[ADMIN] /alpha > logical
Switch to AUTOMATIC policy
mode:
[LOGICAL] /alpha > set policy automatic
policy mode is now AUTOMATICNow the node has been removed from the active dataservice, the services must be stopped and then removed from the configuration.
Stop the running services:
shell> stopallRemove the INI configuration file:
shell> rm /etc/tungsten/tungsten.iniStop the replicator/manager from being started again.
If this all the services on the this node, replicator, manager and connector are being removed, remove the Tungsten Cluster installation entirely:
Remove the startup scripts from your server:
shell> sudo /opt/continuent/tungsten/cluster-home/bin/undeployallRemove the installation directory:
shell> rm -rf /opt/continuentIf the replicator/manager has been installed on a host but the connector is not being removed, remove the start scripts to prevent the services from being automatically started:
shell>rm /etc/init.d/tmanagershell>rm /etc/init.d/treplicator