[erlang-questions] Adding new nodes to a Msenia group?

Chandru <>
Mon Apr 30 10:32:29 CEST 2007

On 30/04/07, Tom Samplonius <> wrote:
> ----- "Chandru" <> wrote:
> > On 27/04/07, Tom Samplonius <> wrote:
> > >
> >
> > Once you have one node with an mnesia schema, you can add new nodes
> > to
> > the schema using the function mnesia:add_table_copy/3. Look in the
> > user guide - I'm sure you will find it in there.
> >
> > Whenever you add a new node to the schema, you first have to create
> > the schema as a ram_copies table on the new node and then change it
> > to
> > a disk based one.
>   I still can't see how to do this.  I setup a single Mnesia node, with on-disk schema, and then created a single table.  Then I setup a second node (but did not create an on-disk schema with create_schema/1), and attempted to duplicate the "schema" table to the second node.  It seems to work:
> ()14> mnesia:add_table_copy(schema, , ram_copies).
> {atomic,ok}
> and  shows as a stopped node, but  is never updated or connected to (nodex() is empty).  I can use connect_to/1 to force a node connection, but Mnesia still shows  as down.

erl -sname b
mnesia:change_config(extra_db_nodes, []).

%% At this point, the schema will be copied over to 

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

mnesia:add_table_copy(my_table, node(), disc_copies).


More information about the erlang-questions mailing list