3.6.1. Adding Datasources to an Existing Deployment

  1. Ensure the new host that is being added has been configured following the Appendix C, Prerequisites.

  2. Update the configuration using tpm, adding the new host to the list of --members and --hosts using +=, which appends the host to the Existing Deployment:

    shell> ./tools/tpm update alpha --members+=host6 --hosts+=host6

    If the host will also act as a connector, also add it to the list of connectors:

    shell> ./tools/tpm update alpha --members+=host6 --hosts=host6 --connectors+=host6
  3. Initially, the newly added host will attempt to read the information from the existing THL. If the full THL is not available from the master, the new slave will need to be reprovisioned:

    1. Log into the new host.

    2. Execute tungsten_provision_slave to read the information from an existing existing and overwrite the data within the new host:

      shell> tungsten_provision_slave --source=host2
      NOTE >>Put alpha replication service offline
      NOTE >>Create a mysqldump backup of host2 in /opt/continuent/backups/provision_mysqldump_2014-01-17_17-27_96
      NOTE >>host2>>Create mysqldump in /opt/continuent/backups/provision_mysqldump_2014-01-17_17-27_96/provision.sql.gz
      NOTE >>Load the mysqldump file
      NOTE >>Put the alpha replication service online
      NOTE >>Clear THL and relay logs for the alpha replication service

Once the new host has been added and re-provision, check the status in cctrl:

[LOGICAL] /alpha > ls

COORDINATOR[host1:AUTOMATIC:ONLINE]

ROUTERS:
+----------------------------------------------------------------------------+
|connector@host1[11401](ONLINE, created=0, active=0)                         |
|connector@host2[8756](ONLINE, created=0, active=0)                          |
|connector@host3[21673](ONLINE, created=0, active=0)                         |
+----------------------------------------------------------------------------+

DATASOURCES:
+----------------------------------------------------------------------------+
|host1(master:ONLINE, progress=219, THL latency=1.047)                       |
|STATUS [OK] [2013/12/13 04:16:17 PM GMT]                                    |
+----------------------------------------------------------------------------+
|  MANAGER(state=ONLINE)                                                     |
|  REPLICATOR(role=master, state=ONLINE)                                     |
|  DATASERVER(state=ONLINE)                                                  |
|  CONNECTIONS(created=0, active=0)                                          |
+----------------------------------------------------------------------------+

+----------------------------------------------------------------------------+
|host2(slave:ONLINE, progress=219, latency=1.588)                            |
|STATUS [OK] [2013/12/13 04:16:17 PM GMT]                                    |
+----------------------------------------------------------------------------+
|  MANAGER(state=ONLINE)                                                     |
|  REPLICATOR(role=slave, master=host1, state=ONLINE)                        |
|  DATASERVER(state=ONLINE)                                                  |
|  CONNECTIONS(created=0, active=0)                                          |
+----------------------------------------------------------------------------+

+----------------------------------------------------------------------------+
|host3(slave:ONLINE, progress=219, latency=2.021)                            |
|STATUS [OK] [2013/12/13 04:16:18 PM GMT]                                    |
+----------------------------------------------------------------------------+
|  MANAGER(state=ONLINE)                                                     |
|  REPLICATOR(role=slave, master=host1, state=ONLINE)                        |
|  DATASERVER(state=ONLINE)                                                  |
|  CONNECTIONS(created=0, active=0)                                          |
+----------------------------------------------------------------------------+

+----------------------------------------------------------------------------+
|host6(slave:ONLINE, progress=219, latency=1.000)                            |
|STATUS [OK] [2014/01/17 05:28:54 PM GMT]                                    |
+----------------------------------------------------------------------------+
|  MANAGER(state=ONLINE)                                                     |
|  REPLICATOR(role=slave, master=host1, state=ONLINE)                        |
|  DATASERVER(state=ONLINE)                                                  |
|  CONNECTIONS(created=0, active=0)                                          |
+----------------------------------------------------------------------------+

If the host has not come up, or the progress does not match the master, check Section 5.6, “Datasource Recovery Steps” for more information on determining the exact status and what steps to take to enable the host operation.