Nitin Bhatt
Nitin Bhatt

Reputation: 436

Adding a new node to existing node cassandra cluster

Starting from one host running Cassandra, I am trying to add a new node and form a cluster.

I update the seeds list on both hosts and after restarting both nodes, I do nodetool status and see both nodes forming a cluster. However, I am seeing some data loss issue. I am not seeing all the data that I added to a column family before I added the new node.

Steps to reproduce:

  1. Start a node with following settings in cassandra.yaml

    • initial_token:
    • num_tokens:256
    • seed_list: host1
  2. Create a keyspace and a column family and enter some data

  3. Start another node, exact same settings and host1 with the following settings changes on both - seeds: host1, host2
  4. When I log in to cal from host2, I do not see all data.

Upvotes: 5

Views: 2324

Answers (2)

Ananth
Ananth

Reputation: 991

Will suggest you to run a nodetool cleanup in both the nodes so that keys get distributed.

Upvotes: 1

vivek mishra
vivek mishra

Reputation: 1162

Running:

nodetool cleanup
nodetool repair
nodetool rebuild

should solve the issue.

Upvotes: 1

Related Questions