1
votes

I have an existing mnesia database, and now I started with proper erlang releases. I use relx.

However, the problem is that I need to be compatible with the existing mnesia database, and when that was created, the node name was nonode@nohost. I have seen that for mnesia, the node name is more than part of a directory name, i.e. it cannot be changed without using backup and restore and some processing.

I can run the release with

bin/XXXX console -name nonode@nohost

and the database is found. However, I would like to use

bin/XXXX start -name nonode@nohost

but then the -name is ignored. When I attach, and do node(), I get something else.

I also found the vm.args file and changed the node name to nonode@nohost there, but got

{error_logger,{{2015,2,14},{13,25,17}},"Invalid node name: ~p~n",['nonode@nohost']}

So it seems that someone really made sure that the name cannot be nonode@nohost :-) Is my only option to do like this: How to rename the Node running a mnesia Database

2

2 Answers

0
votes

Usually erlang command line args are placed in a file called vm.args. You can find it in release directory. Each line of this file is vm option, so in your case you need to put:

-name nonode@nohost

to this file.

0
votes

Ok, it seems that there is no good solutions. I will do a export from the old db and import of the data into a new one created with the correct node name.