0

I have having 5 node cluster of Riak Kv, having ring size as given below

riak@172.XX.XX.10  19.9
riak@172.XX.XX.11  19.9
riak@172.XX.XX.12  19.9
riak@172.XX.XX.13  20.0
riak@172.XX.XX.14  20.3

but after removing node

riak@172.XX.XX.12 from cluster forcely

by command sudo riak-admin force-remove -f riak@172.XX.XX.12

ring size becomes as given below

riak@172.XX.XX.10  25.0
riak@172.XX.XX.11  25.0   
riak@172.XX.XX.13  25.0
riak@172.XX.XX.14  25.0

but I lossed some data , is there any procedure to recover that OR Procedure to remove node from cluster without lossing any data.

1 Answers1

0

The correct procedure to remove a node from a riak cluster is described here https://www.tiot.jp/riak-docs/riak/kv/2.2.3/using/cluster-operations/adding-removing-nodes/#removing-a-node-from-a-cluster.

The correct procedure from the node that you want remove is:

riak-admin cluster leave
riak-admin cluster plan
riak-admin cluster commit

In this way the data are migrated from leaving node to the other nodes. The command riak-admin cluster plan is not necessary but show the actual pending plan that will be committed with riak-admin cluster commit command.

You can also do a similar operation from a different node like this:

riak-admin cluster leave <node>

where <node> is the node name as specified in the node’s configuration files (for example: riak@192.168.2.1) and then as before, check and commit plan:

riak-admin cluster plan # to see the actual plan
riak-admin cluster commit