Reputation: 3898
I have say 2 node Cassandra cluster (for simplification) and i decided to remove one of the node from cluster. Updated the seeds property in cassandra.yaml files of both the nodes.
I logged into node1 and executed below command where Host Id corresponds node2
nodetool removenode
The above command succeeds and i could verify it from below command on Node1
nodetool status
I restart cassandra on Node1 and execute nodetool status again and notice Node2 is added back to cluster.
What is the correct way to remove a cassandra node from cluster ?
Cassandra Version : 2.1.8
Upvotes: 1
Views: 288
Reputation: 1388
Just add below step before starting the node.
Remove the saved_caches folder from your data directory and start the node.
Note: Removing saved_caches directory will not lead to any data loss. If you remove the complete data directory (or commitLog) you will lose data. Cassandra manages some caching mechanism and stores those cache information to avoid cold start. You can get details from below link: https://docs.datastax.com/en/cassandra/2.1/cassandra/operations/ops_configuring_caches_c.html
Upvotes: 1