nodetool move
Moves the node to a new token position in the ring.
Synopsis
Section titled “Synopsis”nodetool [connection_options] move <new_token>See connection options for connection options.
Description
Section titled “Description”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.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
new_token | The new token value for this node |
Examples
Section titled “Examples”Move to New Token
Section titled “Move to New Token”nodetool move 1234567890Prerequisites
Section titled “Prerequisites”Single Token Configuration
Section titled “Single Token Configuration”This command requires single-token configuration:
num_tokens: 1initial_token: <token_value>Not Compatible with vnodes
Section titled “Not Compatible with vnodes”If using vnodes (num_tokens > 1), you'll see:
Error: Cannot move a node with vnodesWhen to Use
Section titled “When to Use”Rebalancing Token Ring
Section titled “Rebalancing Token Ring”To redistribute data more evenly:
# Check current token distributionnodetool ring
# Calculate new token for better distribution# Move node to new positionnodetool move <calculated_token>Correcting Token Placement
Section titled “Correcting Token Placement”After incorrect initial token assignment:
# View current tokennodetool info | grep Token
# Move to correct positionnodetool move <correct_token>Process Flow
Section titled “Process Flow”Token Move Process:
1. Execute move command2. Node calculates new token ranges3. Streams out data no longer owned4. Streams in data now owned5. Updates token in gossip6. Move completeMonitoring
Section titled “Monitoring”During Move
Section titled “During Move”# Watch streaming progresswatch -n 5 'nodetool netstats'
# Check node statusnodetool statusVerify Completion
Section titled “Verify Completion”# Check new tokennodetool info | grep Token
# Verify ringnodetool ringImpact Assessment
Section titled “Impact Assessment”| Aspect | Impact |
|---|---|
| Disk I/O | High (streaming) |
| Network | High (data transfer) |
| CPU | Moderate |
| Query latency | May increase during move |
| Duration | Minutes to hours |
Troubleshooting
Section titled “Troubleshooting”Move Fails with vnodes
Section titled “Move Fails with vnodes”Error: Cannot move a node with vnodesCannot use move with vnodes. For vnode clusters, use nodetool decommission and add new node, or use nodetool rebuild.
Move Interrupted
Section titled “Move Interrupted”# Check streaming statusnodetool netstats
# Node may be in inconsistent state# May need to decommission and rejoinData Inconsistency After Move
Section titled “Data Inconsistency After Move”# Run repair after move completesnodetool repair -prBest Practices
Section titled “Best Practices”Move Guidelines
- Plan token values - Calculate optimal distribution
- Maintenance window - Perform during low traffic
- Monitor streaming - Watch netstats during move
- Repair after - Run repair to ensure consistency
- 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
Token Calculation
Section titled “Token Calculation”Even Distribution Formula
Section titled “Even Distribution Formula”For N nodes with single tokens:
Token for node i = (i * (2^63 * 2)) / NExample: 4 Node Cluster
Section titled “Example: 4 Node Cluster”Node 0: 0Node 1: 4611686018427387904Node 2: 9223372036854775808Node 3: 13835058055282163712Related Commands
Section titled “Related Commands”| Command | Relationship |
|---|---|
| ring | View token ring |
| info | View node's current token |
| decommission | Remove node from cluster |
| netstats | Monitor streaming |
| status | View cluster status |