Riak Force remove node from Riak KV cluster

左心房为你撑大大i 提交于 2019-12-12 04:06:45

问题


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:


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


来源:https://stackoverflow.com/questions/46292621/riak-force-remove-node-from-riak-kv-cluster

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!