[erlang-questions] mnesia recover from netsplit, can't delete node from schema

Daniel Dormont dan@REDACTED
Fri Jun 29 16:12:46 CEST 2012


Just to give a little more information:

I tried creating a new node from scratch to join my cluster. I said

erl -name new_node@REDACTED -s mnesia -mnesia dir '"/var/lib/ejabberd"' -mnesia
extra_db_nodes "['ejabberd@REDACTED']"

and that seemed to load successfully. I then did the usual

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

and got the error: {aborted,{already_exists,schema,'new_node@REDACTED'}}

What would cause that? Does this mean the schema on A is permanently hosed
in some way and I need to wipe it and recreate?

dan

On Thu, Jun 28, 2012 at 3:40 PM, Daniel Dormont <dan@REDACTED>wrote:

> Here is the scenario that happened to me as best I can tell. I had two
> nodes in a cluster, let's call them A and B. B became unavailable for a
> while and got rebooted. When I tried to start it again, things seem to work
> except that certain tables seem not to exist any more. As far as I can
> tell, these tables used to be enabled only on B and not A, and are now in
> some sort of weird hybrid unavailable state.
>
> A is still running fine in production even with these tables missing, but
> I can't seem to get a clean start of my application (Ejabberd) on B. So
> what I figured I would do would be just start a fresh node on B, start
> Mnesia, add extra_db_nodes pointing to A and go from there. But the problem
> is A still thinks these certain tables exist only on B (they are listed as
> remote on A). Fortunately, Ejabberd is smart enough to create any tables it
> needs on startup, so I was thinking a clean start on B would do this. So I
> went into A and ran
>
> mnesia:del_table_copy(schema, B).
>
> thinking this would make the remote tables sort of go away. But instead it
> fails with
>
> {aborted,{no_exists,vcard_search}}
>
> And trying to delete the table directly yields the same result.
>
> Is there a way I can force Mnesia on A to completely forget about a set of
> remote tables (and, for that matter, the node that was supposed to store
> them) before I bring a new node online?
>
> Dan
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120629/4265cf74/attachment.htm>


More information about the erlang-questions mailing list