If a datasource has been lost within the dataservice, for example, a complete hardware failure or disk crash, the datasource can be added back to the cluster once the operating system and other configuration have been completed. Essentially, the process is the same as when initially setting up your node, with the node being re-confirmed as part of the running service, installing and configuring only the returning node to the cluster.
In the following steps, the host
host3
is being recovered into the
cluster:
Setup the host with the pre-requisites, as described in Appendix B, Prerequisites .
Restore a snapshot of the data taken from another Replica into the
dataserver. If you have existing backups of this Replica or another,
they should be used. If not, take a snapshot of an existing Replica and
use this to apply the data to the Replica. This will need to be
performed outside of the Tungsten Cluster service using the native
restore method for the backup method you have chosen. The backup must
include the entire schema of your database, including the
tungsten
schemas for your
services.
The next steps depend on the availability of the hostname. If the hostname of the datasource that was lost can be reused, then the host can be reconfigured within the existing service. If the hostname is not available, the service must be reconfigured to remove the old host, and add the new host.
Reusing an Existing Hostname
Login in to the server used for staging your Tungsten Cluster installation, and change to the staging directory. To determine the staging directory, use:
shell> tpm query staging
Repeat the installation of the service on the host being brought back:
shell> ./tools/tpm update svc_name --hosts=host3
The update process will re-install Tungsten Cluster on the host
specified without reacting to the existence of the
tungsten
schema in the
database.
Removing and Adding a new Host
Remove the existing (lost) datasource from the cluster using cctrl . First switch to administrative mode:
[LOGICAL] /alpha > admin
Remove the host from the dataservice:
[ADMIN] /alpha > rm host3
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)>
Login in to the server used for staging your Tungsten Cluster installation, and change to the staging directory. To determine the staging directory, use:
shell> tpm query staging
Update the dataservice configuration with the new datasource, the
example below uses host4
as
the replacement datasource. The
--dataservice-master-host
should
be used to specify the current Primary in the cluster:
shell> ./tools/tpm configure svc_name --dataservice-hosts=host1,host2,host4 \
--dataservice-connectors=host1,host2,host4 \
--dataservice-master-host=host4
Update the installation across all the hosts:
shell> ./tools/tpm update svc_name
Use cctrl to check and confirm the operation of the restore datasource.
The restored host should be part of the cluster and accepting events from the Primary as configured.