[erlang-questions] Adding new disc_copies node to existing schema
Chandru
chandrashekhar.mullaparthi@REDACTED
Wed Sep 26 10:26:06 CEST 2007
On 25/09/2007, Dmitriy Gorbenko <bazil@REDACTED> wrote:
> Hi all.
>
> I need an advice: I have two nodes (node1@REDACTED and node2@REDACTED). The
> are in the same schema.
> And I want to add a new node node3@REDACTED to existing schema.
>
> Next code is helpless, because it creates ram_copies node in schema:
>
> mnesia:change_config(extra_db_nodes, [node3@REDACTED]).
> mnesia:add_table_copy(tt, node3@REDACTED, ram_copies).
>
> but I need create a disc_copies node.
>
Try this.
One node1 or node2
================
mnesia:add_table_copy(schema, node3@REDACTED, ram_copies).
One node3@REDACTED
================
erl -sname node3@REDACTED -setcookie cookie
mnesia:start().
mnesia:change_config(extra_db_nodes, [node1@REDACTED]).
mnesia:change_table_copy_type(schema, node(), disc_copies).
mnesia:add_table_copy(tt, node3@REDACTED, disc_copies).
cheers
Chandru
More information about the erlang-questions
mailing list