I followed the following steps to migrate all the data from one cluster to a completely new cluster:
http://datascale.io/cloning-cassandra-clusters-fast-way/
I managed to get all the data to the new cluster, the servers see each other, nodetool status reports all nodes as UN
. However, I do have a question, in one of the paragraph the initial_token
values are taken from the nodes and copied one on one to the new servers, and I had to add JVM_OPTS="$JVM_OPTS -Dcassandra.load_ring_state=false"
. I suppose the JVM_OPTS
can be discarded now, but I'm not so sure about the initial_tokens
?
My entire configuration is managed by Puppet, and I'm now unsure whether the initial_tokens
are needed once the cluster has been populated and initialized? The manifests are very clean, and this would add unnecessary complications since the values of inital_tokens
are unique to each node. I want to be sure, since this is my first time dealing with Cassandra.
Best Answer
It seems that once the cluster has been initialized, the
initial_token
value gets written somewhere inside the Cassandra structure. Even after restarting the entire new cluster without theinitial_token
directive, the cluster works fine and I get the exact same tokens with the same procedure I got them on the old cluster.Looks like after things are stabilized, you can remove the
initial_token
from thecassandra.yaml
file.