[erlang-questions] Adding new disc_copies node to existing schema

Chandru <>
Wed Sep 26 10:26:06 CEST 2007


On 25/09/2007, Dmitriy Gorbenko <> wrote:
> Hi all.
>
> I need an advice: I have two nodes ( and ). The
> are in the same schema.
> And I want to add a new node  to existing schema.
>
> Next code is helpless, because it creates ram_copies node in schema:
>
> mnesia:change_config(extra_db_nodes, []).
> mnesia:add_table_copy(tt, , ram_copies).
>
> but I need create a disc_copies node.
>

Try this.

One node1 or node2
================
mnesia:add_table_copy(schema, , ram_copies).

One 
================
erl -sname  -setcookie cookie

mnesia:start().

mnesia:change_config(extra_db_nodes, []).

mnesia:change_table_copy_type(schema, node(), disc_copies).

mnesia:add_table_copy(tt, , disc_copies).

cheers
Chandru



More information about the erlang-questions mailing list