Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add a mnesia node to an already running mnesia cluster. erl -name db2@1.2.3.4 -mnesia dir '"/path/to/db"
do_init_slave_node(MasterNode) when MasterNode =/= node() ->
mnesia:start(),
mnesia:change_config(extra_db_nodes, [MasterNode]),
mnesia:change_table_copy_type(schema, node(), disc_copies),
[mnesia:add_table_copy(Table, node(), disc_copies) || Table <- mnesia:system_info(tables), Table =/= schema].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.