[erlang-questions] Remove running node from mnesia cluster

Martin Karlsson martink@REDACTED
Mon Jul 21 03:21:03 CEST 2014


>
>
> Is there a way to take a node out of mnesia clustering while leaving it
> up-and-running?
>
>
Hi Kristoffer,

I'm no mnesia expert but I remember reading that to completely remove a
node you need to delete the schema on the "orphaned" node before starting
it again. Look under chapter 5.6 in mnesia user guide (
http://www.erlang.org/doc/apps/mnesia/Mnesia_chap5.html)

So your script would look like this:

   rpc:call('node_to_be_orphaned', mnesia, stop, []),
   mnesia:del_table_copy(schema, 'node_to_be_orphaned'),
   mnesia:delete_schema(['node_to_be_orphaned']),
   rpc:call('node_to_be_orphaned', mnesia, start, []).

Note that all data on the orphaned node will be lost.

Cheers,
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140721/77cf4864/attachment.htm>


More information about the erlang-questions mailing list