Adding a datacenter to a single-token architecture cluster

Steps for adding a datacenter to single-token architecture clusters, not clusters using virtual nodes.

Steps for adding a datacenter to single-token architecture clusters, not clusters using .
Warning: Only add new nodes to the cluster. A new node is a system that DataStax Enterprise has never started. The node must have absolutely NO PREVIOUS DATA in the data directory, saved_caches, commitlog, and hints. Adding nodes previously used for testing or that have been removed from another cluster, merges the older data into the cluster and may cause data loss or corruption.

cassandra.yaml

The location of the cassandra.yaml file depends on the type of installation:
Package installations /etc/dse/cassandra/cassandra.yaml
Tarball installations installation_location/resources/cassandra/conf/cassandra.yaml

cassandra-rackdc.properties

The location of the cassandra-rackdc.properties file depends on the type of installation:
Package installations /etc/dse/cassandra/cassandra-rackdc.properties
Tarball installations installation_location/resources/cassandra/conf/cassandra-rackdc.properties

cassandra-topology.properties

The location of the cassandra-topology.properties file depends on the type of installation:
Package installations /etc/dse/cassandra/cassandra-topology.properties
Tarball installation installation_location/resources/cassandra/conf/cassandra-topology.properties

Procedure

  1. Ensure that you are using NetworkTopologyStrategy for all keyspaces.
  2. For each new node, edit the configuration properties in the cassandra.yaml file:
    • Set auto_bootstrap to False.
    • Set the initial_token. Be sure to offset the tokens in the new datacenter, see Initializing single-token architecture datacenters.
    • Set the cluster name.
    • Set any other non-default settings.
    • Set the seed lists. Every node in the cluster must have the same list of seeds and include at least one node from each datacenter. Typically one to three seeds are used per datacenter.
  3. Update the relevant properties file on all nodes to include the new nodes. You do not need to restart.
  4. Ensure that your client does not auto-detect the new nodes so that they aren't contacted by the client until explicitly directed.
  5. If using a QUORUM consistency level for reads or writes, check the LOCAL_QUORUM or EACH_QUORUM consistency level to make sure that the level meets the requirements for multiple datacenters.
  6. Start the new nodes.
  7. The GossipingPropertyFileSnitch always loads cassandra-topology.properties when that file is present. Remove the file from each node on any new cluster or any cluster migrated from the PropertyFileSnitch.
  8. After all nodes are running in the cluster:
    1. Change the replication factor for your keyspace for the expanded cluster.
    2. Run nodetool rebuild on each node in the new datacenter.