<div dir="ltr">If you do mnesia:info() on node2@TH1574U, it will list the table 'log_count' there as well.<div>Each node have a "local" 'log_count' table that is not visible on the other nodes.<br><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, May 16, 2018 at 2:37 PM Prakash Parmar <<a href="mailto:prakash.parmar@outlook.com">prakash.parmar@outlook.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div id="m_7754832566294675397divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<div><span style="font-family:Verdana,Geneva,sans-serif">Hello All,</span></div>
<div><br>
</div>
<div><span style="font-family:Verdana,Geneva,sans-serif">According to my project requirements, I have Two mnesia nodes namely 'node1@TH1574U' and 'node2@TH1574U'. I want to create a Mnesia table with local content and same table name on both nodes.</span><br>
<br>
<span style="font-family:Verdana,Geneva,sans-serif">Here are the</span><span style="font-family:Verdana,Geneva,sans-serif"> Steps I'm following :</span><br>
<br>
<span style="font-family:Verdana,Geneva,sans-serif">In One Terminal  -  <span style="font-family:"Lucida Console",Monaco,monospace">
$ erl -sname node1 -setcookie abc</span></span><br>
<br>
<span style="font-family:Verdana,Geneva,sans-serif">On another Terminal -<span style="font-family:"Lucida Console",Monaco,monospace"> $ erl -sname node2 -setcookie abc</span></span><br>
<br>
<span>=====================================================================================</span></div>
<div><span style="font-family:Verdana,Geneva,sans-serif"><span style="font-family:"Lucida Console",Monaco,monospace"><br>
</span></span></div>
<div><span style="font-family:Verdana,Geneva,sans-serif"><span style="font-family:"Lucida Console",Monaco,monospace"></span><span style="font-family:"Lucida Console",Monaco,monospace">(node1@TH1574U)1>
</span><span style="font-family:"Lucida Console",Monaco,monospace">net_adm:ping('node2@TH1574U').
</span></span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">pong</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace"> </span><br>
<span style="font-family:Verdana,Geneva,sans-serif"><span style="font-family:"Lucida Console",Monaco,monospace">(node1@TH1574U)2></span><span style="font-family:"Lucida Console",Monaco,monospace"> nodes().</span></span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">[node2@TH1574U]</span><br>
<br>
<span style="font-family:"Lucida Console",Monaco,monospace">(node1@TH1574U)3> mnesia:create_schema(['node1@TH1574U', 'node2@TH1574U']).</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">ok</span><br>
<br>
<span style="font-family:"Lucida Console",Monaco,monospace">(node1@TH1574U)4> rpc:multicall(['node1@TH1574U', 'node2@TH1574U'], mnesia, start,[]).</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">{[ok,ok],[]}</span><br>
<br>
<span style="font-family:"Lucida Console",Monaco,monospace">(node1@TH1574U)5> mnesia:create_table( log_count,[{attributes, [counter, value]},{local_content, true},{disc_copies, ['node1@TH1574U','node2@TH1574U']}]).  </span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">{atomic,ok}</span><br>
<br>
<span style="font-family:"Lucida Console",Monaco,monospace">(node1@TH1574U)6> mnesia:info().                                                                                                                      ---> Processes holding locks <---
</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">---> Processes waiting for locks <---
</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">---> Participant transactions <---
</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">---> Coordinator transactions <---</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">---> Uncertain transactions <---
</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">---> Active tables <---
</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">log_count      : with 0        records occupying 298      words of mem</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">schema         : with 2        records occupying 530      words of mem</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">===> System info in version "4.14.3", debug level = none <===</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">opt_disc. Directory "/home/user/svn/mvpn-1.1/Mnesia.node1@TH1574U" is used.</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">use fallback at restart = false</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">running db nodes   = [node2@TH1574U,node1@TH1574U]</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">stopped db nodes   = []
</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">master node tables = []</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">remote             = []</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">ram_copies         = []</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">disc_copies        = [log_count,schema]</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">disc_only_copies   = []</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">[{node1@TH1574U,disc_copies}] = [log_count]</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">[{node1@TH1574U,disc_copies},{node2@TH1574U,disc_copies}] = [schema]</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">4 transactions committed, 2 aborted, 0 restarted, 5 logged to disc</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">0 held locks, 0 in queue; 0 local transactions, 0 remote</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">0 transactions waits for other nodes: []</span><br>
<span style="font-family:"Lucida Console",Monaco,monospace">ok</span><br>
=====================================================================================</div>
<div><span style="font-family:Verdana,Geneva,sans-serif"></span><span style="font-family:Verdana,Geneva,sans-serif"><br>
</span></div>
<div><span style="font-family:Verdana,Geneva,sans-serif">Can anyone help me out why Table is not getting created on a 2nd</span><span style="font-family:Verdana,Geneva,sans-serif">node?
<br>
</span></div>
<div><br>
<span style="font-family:Verdana,Geneva,sans-serif">When I removed option {local_content, true} that table getting created on a 2nd</span><span style="font-family:Verdana,Geneva,sans-serif"> node.</span><span style="font-family:Verdana,Geneva,sans-serif"></span></div>
<div><span style="font-family:Verdana,Geneva,sans-serif"><br>
</span></div>
<div><span style="font-family:Verdana,Geneva,sans-serif">Is there another way to
</span><span style="font-family:Verdana,Geneva,sans-serif">achive</span><span style="font-family:Verdana,Geneva,sans-serif"> this?</span></div>
<div><span style="font-family:Verdana,Geneva,sans-serif"></span><br>
<span style="font-family:Verdana,Geneva,sans-serif">/Prakash Parmar</span></div>
<div><span style="font-family:Verdana,Geneva,sans-serif"><br>
</span></div>
</div>
</div>

_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>