1) Know how the application is writing/reading. In the sense if it is quorum set to local_quorum or each_quorum
- Datastax Driver - set to DCAwareRoundRobinPolicy
2) If cassandra is started on new nodes, stop it and remove the data, log, saved cache , commit log files.
3) Cassandra.yaml
- auto_bootstrap: false
- -seeds
- endpoint snitch
- listen address
- rpc address
- num tokens
4) Update relevant property file snitch
- cassandra rackdc properties file
5) start now cassandra
6) After all nodes start in the Datacenter
- Set replication factor of keyspace to dc name and number of replicas needed
- Run nodetool rebuild specifying the existing datacenter on all nodes in the new datacenter
- Change to true or remove auto_bootstrap: false in the cassandra.yaml file
----
7) We need to update the seed node on all nodes and do a restart
8) nohup nodetool rebuild -dc India_dc1 -ks bypramod >> /tmp/$(date +%Y-%m-%d)_`hostname -i`rebuild.log 2>&1 &
9) remove auto_bootstrap and restart the service on new dc.
***