[erlang-questions] Adding new nodes to a Msenia group?
Chandru
chandrashekhar.mullaparthi@REDACTED
Sat Apr 28 00:36:17 CEST 2007
On 27/04/07, Tom Samplonius <tom@REDACTED> wrote:
>
> I've trying to understand Mnesia to see if it is suitable for my project. It seems that you must define the nodes that contain on-disk storage when the schema is created. And that must be done with Mnesia shutdown. Is is possible to create a schema with on-disk storage when Mnesia is active? Is it possible to create new Mnesia nodes with an empty node list (local node), and then use add_table_copy/3 to extend the database onto the new node?
>
You can't create a disk based mnesia schema with no nodes in it. When
you start up mnesia without creating a schema, you get a ram based
mnesia schema which has just that node. You can then convert that
schema to a disk based one whenver you want to using
mnesia:change_table_copy_type/3.
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.
Chandru
More information about the erlang-questions
mailing list