Skip to content

Instantly share code, notes, and snippets.

@samuraisam
Created July 31, 2012 20:34
Show Gist options
  • Select an option

  • Save samuraisam/3220248 to your computer and use it in GitHub Desktop.

Select an option

Save samuraisam/3220248 to your computer and use it in GitHub Desktop.
live migrating a 3-node cluster (RF=2) to a new 3-node cluster (RF=2)
NOTE! If you are starting a cluster using the DSC AMI - wipe the data directories of all the nodes and restart them before starting this process.
1. configure the first node of the new cluster to tok=170141183460469231731687303715884105728, autobootstrap=yes; start it
2. wait 2 mins
3. configure the 2nd and 3rd nodes of the new cluster to tok=$oldClusterNode[N].Tok - 1, autobootstrap=yes, waiting 2 mins between each
4. point clients at the new cluster nodes
5. decommission the old cluster nodes, 1 at a time, starting with the first node
6. move node 1 token from 170141183460469231731687303715884105728 to 0
CURRENT RING:
Address DC Rack Status State Load Owns Token
98762195403485621985010037012424498538
10.4.62.215 datacenter1 rack1 Up Normal 1.53 GB 41.95% 0
10.72.226.33 datacenter1 rack1 Up Normal 1.65 GB 33.33% 56703851999289891297969860682700010126
10.254.183.47 datacenter1 rack1 Up Normal 1.14 GB 24.72% 98762195403485621985010037012424498538
@samuraisam

Copy link
Copy Markdown
Author

AFTER:

Address DC Rack Status State Load Owns Token
113427455640312821154458202477256070484
10.4.62.215 datacenter1 rack1 Up Normal 1.34 GB 33.33% 0
10.72.226.33 datacenter1 rack1 Up Normal 1.45 GB 50.00% 85070591730234615865843651857942052864
10.254.183.47 datacenter1 rack1 Up Normal 1.01 GB 16.67% 113427455640312821154458202477256070484

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment