0
votes

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

[email protected]  19.9
[email protected]  19.9
[email protected]  19.9
[email protected]  20.0
[email protected]  20.3

but after removing node

[email protected] from cluster forcely

by command sudo riak-admin force-remove -f [email protected]

ring size becomes as given below

[email protected]  25.0
[email protected]  25.0   
[email protected]  25.0
[email protected]  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

1 Answers

0
votes

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: [email protected]) and then as before, check and commit plan:

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