Drain and remove nodes
Take a node out of the cluster without losing data or interrupting service.
Take a node out of the cluster without losing data or interrupting service. First you drain it and then you remove it.
Requirements
- Access to
teseladb adminon a node of the cluster. - At least one other active node to take its replicas.
Drain the node
Shell
teseladb admin node drain <node_id>The node goes to Draining. The balancer takes its replicas, its leaderships and, finally, its vote in Group 0. Once it
has no replica left, it closes its client port and drivers go to another node.
Remove the node
Shell
teseladb admin node remove <node_id>Check
teseladb admin nodes no longer lists the removed node. You can now shut its machine down.
Common problems
node drainfails on the last active node, because a cluster needs at least one serving.node removefails and says how many replicas it still has. Wait for the drain to finish.