Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

nodetool move

Moves the node to a new token position in the ring.


Terminal window
nodetool [connection_options] move <new_token>

See connection options for connection options.

nodetool move reassigns a node's token position in the cluster ring. This causes the node to stream data to/from other nodes to match its new token ownership. Moving a token changes which data the node is responsible for.

Disruptive Operation

Moving a node causes significant data streaming and temporarily affects cluster performance. Plan carefully and execute during maintenance windows.

Single Token Only

This command only works with single-token nodes. Clusters using vnodes (virtual nodes, the modern default) cannot use this command.


ArgumentDescription
new_tokenThe new token value for this node

Terminal window
nodetool move 1234567890

This command requires single-token configuration:

cassandra.yaml
num_tokens: 1
initial_token: <token_value>

If using vnodes (num_tokens > 1), you'll see:

Error: Cannot move a node with vnodes

To redistribute data more evenly:

Terminal window
# Check current token distribution
nodetool ring
# Calculate new token for better distribution
# Move node to new position
nodetool move <calculated_token>

After incorrect initial token assignment:

Terminal window
# View current token
nodetool info | grep Token
# Move to correct position
nodetool move <correct_token>

Token Move Process:
1. Execute move command
2. Node calculates new token ranges
3. Streams out data no longer owned
4. Streams in data now owned
5. Updates token in gossip
6. Move complete

Terminal window
# Watch streaming progress
watch -n 5 'nodetool netstats'
# Check node status
nodetool status
Terminal window
# Check new token
nodetool info | grep Token
# Verify ring
nodetool ring

AspectImpact
Disk I/OHigh (streaming)
NetworkHigh (data transfer)
CPUModerate
Query latencyMay increase during move
DurationMinutes to hours

Error: Cannot move a node with vnodes

Cannot use move with vnodes. For vnode clusters, use nodetool decommission and add new node, or use nodetool rebuild.

Terminal window
# Check streaming status
nodetool netstats
# Node may be in inconsistent state
# May need to decommission and rejoin
Terminal window
# Run repair after move completes
nodetool repair -pr

Move Guidelines

  1. Plan token values - Calculate optimal distribution
  2. Maintenance window - Perform during low traffic
  3. Monitor streaming - Watch netstats during move
  4. Repair after - Run repair to ensure consistency
  5. One at a time - Move one node before starting another

Considerations

  • Only works with single-token configuration
  • High network and disk impact
  • May take extended time for large datasets
  • Consider decommission/add instead for major changes

For N nodes with single tokens:

Token for node i = (i * (2^63 * 2)) / N
Node 0: 0
Node 1: 4611686018427387904
Node 2: 9223372036854775808
Node 3: 13835058055282163712

CommandRelationship
ringView token ring
infoView node's current token
decommissionRemove node from cluster
netstatsMonitor streaming
statusView cluster status