[erlang-questions] Simple question about nodes distribution

Alexander Lamb alexander.lamb@REDACTED
Thu May 22 10:25:51 CEST 2008


Thanks, this was the step I was missing.

Alex


Le 22 mai 08 à 10:14, Per Melin a écrit :

> 2008/5/22 Alexander Lamb <alexander.lamb@REDACTED>:
>> Why, when I ask for nodes() on either system, does it answer with an
>> empty list.
>
> You need to let the nodes know that they should connect. For example
> with net_kernel:connect_node/1, or just:
>
> (alex@REDACTED)1> net_adm:ping('alex2@REDACTED').
>
>
>> I experimented further with mnesia. I have a schema on node alex. I
>> start mnesia.
>> Then, on node alex2 I create a mnesia schema and start mnesia.
>
> You need the same schema on both nodes. You can't create them
> independently. Give both nodes to mnesia:create_schema/1.
>
> You can of course also add a node to a schema. I've always found this
> a bit awkward, so maybe I'm doing it wrong, but the way I add an extra
> node is with mnesia:change_config(extra_db_nodes, ['alex2@REDACTED'])
> and then mnesia:change_table_copy_type(schema, 'alex2@REDACTED',
> disc_copies).
>




More information about the erlang-questions mailing list