Removing a dead node from Mnesia?

Shawn Pearce spearce@REDACTED
Sun Feb 8 00:23:14 CET 2004


This may not be possible, buuuut:

Lets say I've created a table as disc_copies on two nodes, a@REDACTED and b@REDACTED

Now lets say that while both emulators are down, I do something stupid
making it no longer possible for me to run b@REDACTED  For example
the computer has been run over by a truck while sitting out on the curb
during an ice storm.

How do I get Mnesia on a@REDACTED to forget about the full table copy on
b@REDACTED?

(a@REDACTED)12> mnesia:del_table_copy(account, 'b@REDACTED').
{aborted,{not_active,"All replicas on diskfull nodes are not active yet",
		account,
		[b@REDACTED]}}

Is this going to require very low level Mnesia hacking?

After digging around in mnesia_schema, it looks like the delete cannot
be done because the schema table is disc_copies on both nodes, and with
b@REDACTED down its not possible to modify the schema table to make the changes.

It is however possible to delete the schema table from b@REDACTED while b@REDACTED is
in smoking ruins:

(a@REDACTED)13> mnesia:del_table_copy(schema, 'b@REDACTED').
{atomic,ok}

But this creates an odd state if b@REDACTED comes back from the grave.
a@REDACTED thinks the schema table on b@REDACTED is ram_copies, but b@REDACTED thinks it
is disc_copies...  which is flat out not correct.

-- 
Shawn.



More information about the erlang-questions mailing list