[erlang-questions] Ridiculuous newbie mnesia question.

Jeffrey Rennie surferjeff@REDACTED
Wed Oct 27 05:37:38 CEST 2010

Thank you for your patience.  I still haven't escaped from this wet paper

> Looking at the mnesia:info() output, there are a couple of things
> to note.
> 1. 'running db nodes = [emacs@REDACTED]' means that while a@REDACTED
>    and b@REDACTED might be running at the erlang level, perhaps even
>    with mnesia runnin, they are not connected to emacs@REDACTED

Why aren't they connected?  How do I connect them?  I can ping them (see

> 2. The line '"c:/.../Mnesia.emacs@REDACTED" is NOT used' means that
>     you have not created a persistent schema. Normally, the persistent
>     schema indicates which nodes are part of the mnesia cluster. Any
>     other nodes that want to join should specify -mnesia extra_db_nodes
> Ns,
>     where Ns includes at least some of the nodes listed in the
> persistent schema.
> To create a persistent schema, you run this before starting mnesia:
> mnesia:create_schema(Nodes).
> ...with the nodes in Nodes all up and running. You only need to call it
> from one node; it will create a schema on each node automatically.

I tried that.  I didn't specify the other nodes because the documentation
for mnesia:create_schema says to specify disk copy nodes only, and I want
ram copy nodes.

But mnesia:info() still shows me I'm not connected to anything:




create_tables(MnesiaNodes) ->
			[{attributes, record_info(fields, game_record)},
			 {ram_copies, MnesiaNodes}]).

init() ->
    create_tables([a@REDACTED, b@REDACTED]).

(emacs@REDACTED)4> backgammon:init().
(emacs@REDACTED)5> mnesia:info().
---> Processes holding locks <--- 
---> Processes waiting for locks <--- 
---> Participant transactions <--- 
---> Coordinator transactions <---
---> Uncertain transactions <--- 
---> Active tables <--- 
schema         : with 2        records occupying 546      words of mem
===> System info in version "4.4.13", debug level = none <===
opt_disc. Directory
"c:/Users/jeff/code/code/scratch/erlang/Mnesia.emacs@REDACTED" is used.
use fallback at restart = false
running db nodes   = [emacs@REDACTED]
stopped db nodes   = [] 
master node tables = []
remote             = [game_record]
ram_copies         = []
disc_copies        = [schema]
disc_only_copies   = []
[] = [game_record]
[{emacs@REDACTED,disc_copies}] = [schema]
3 transactions committed, 0 aborted, 0 restarted, 1 logged to disc
0 held locks, 0 in queue; 0 local transactions, 0 remote
0 transactions waits for other nodes: []
(emacs@REDACTED)6> net_adm:ping(a@REDACTED).
(emacs@REDACTED)7> net_adm:ping(b@REDACTED).

More information about the erlang-questions mailing list