Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I remove an extra node

Tags:

erlang

mnesia

I have a group of erlang nodes that are replicating their data through Mnesia's "extra_db_nodes"... I need to upgrade hardware and software so I have to detach some nodes as I make my way from node to node.

How does one remove a node and still preserve the data that was inserted?

[update] removing nodes is as important as adding them. Over time as your cluster grows it must also contract. If not then Mnesia is going to be busy trying to send data to nonexistent nodes filling up queues and keeping the network busy.

[final update] after pouring through the erlang/mnesia source code I was able to determine that it is not possible to completely disassociate nodes. While del_table_copy removes the linkage between tables it is incomplete. I would close this question but none of the close descriptions are adequate.

like image 730
Richard Avatar asked May 04 '09 12:05

Richard


People also ask

How do you remove a node?

If the node to be deleted is the root, simply delete it. To delete a middle node, we must have a pointer to the node previous to the node to be deleted. So if positions are not zero, we run a loop position-1 times and get a pointer to the previous node.

How do I permanently delete nodes?

To completely uninstall node + npm is to do the following: go to /usr/local/lib and delete any node and node_modules. go to /usr/local/include and delete any node and node_modules directory. if you installed with brew install node, then run brew uninstall node in your terminal.

What is node removal in computer?

Node deletion is the procedure of removing a node from a network, where the node is either chosen randomly or directly. Node deletion is used to test the robustness and the attack tolerance of networks.


1 Answers

I wish I had found this a long time ago: http://weblambdazero.blogspot.com/2008/08/erlang-tips-and-tricks-mnesia.html

basically, with a properly functioning cluster....

  • login to the cluster to be removed

  • stop mnesia

    mnesia:stop().
    
  • login to a different node on the cluster

  • delete the schema

    mnesia:del_table_copy(schema, [email protected]).
    
like image 75
Richard Avatar answered Sep 26 '22 06:09

Richard