DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


question

Tri avatar image
Tri asked ·

Where should nodetool rebuild be run?

From nodetool rebuild documentation :

Rebuilds data by streaming from other nodes.

This command operates on multiple nodes in a cluster and streams data only from a single source replica when rebuilding a token range. Use this command to add a new datacenter to an existing cluster.

But where exactly to run nodetool rebuild ?

  • On each node of each existing DC (or a single time on any node of each existing DC)?

  • Or the opposite? ie. run nodetool rebuild on each node of the new DC (or a single time on any node of the new DC)?

add nodes
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

The nodetool rebuild command as the document states is designed for adding new nodes in a new datacenter of an existing cluster.

The command is run on the node that is being added to the new DC as per step 10 of the document you quoted (Adding a datacenter to a cluster):

Run nodetool rebuild on each node in the new datacenter, specifying the datacenter to rebuild from. This step replicates the data to the new datacenter in the cluster.
nodetool rebuild -- datacenter_name

Cheers!

2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Thanks for the link Adding a datacenter to a cluster. Now I notice this link is mentioned in the nodetool rebuild whcih I glossed over when scanning the doc quickly :-(

0 Likes 0 · ·

Not a problem. Cheers!

0 Likes 0 · ·