<div dir="ltr"><br><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>hi, </div><div>
have installed two identical servers with ubuntu 12.04, and installed drbd8-utils and ocfs2-tools. </div><div><br></div><div>i have configured drbd.conf as:</div></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div><div># You can find an example in  /usr/share/doc/drbd.../drbd.conf.example</div><div><br></div><div>include &quot;drbd.d/global_common.conf&quot;;</div><div>include &quot;drbd.d/*.res&quot;;</div><div>
<br></div><div>resource datacluster {</div><div>        protocol C;</div><div><br></div><div>        handlers {</div><div>                pri-on-incon-degr &quot;echo o &gt; /proc/sysrq-trigger ; halt -f&quot;;</div><div>
                pri-lost-after-sb &quot;echo o &gt; /proc/sysrq-trigger ; halt -f&quot;;</div><div>                local-io-error &quot;echo o &gt; /proc/sysrq-trigger ; halt -f&quot;;</div><div>                outdate-peer &quot;/usr/lib/heartbeat/drbd-peer-outdater -t 5&quot;;</div>
<div>        }</div><div><br></div><div>        startup {</div><div>                wfc-timeout 120;</div><div>                degr-wfc-timeout 120;</div><div>                become-primary-on both;</div><div>        }</div>
<div><br></div><div>        disk {</div><div>                on-io-error detach;</div><div> <span style="white-space:pre-wrap">                </span>fencing resource-and-stonith;</div><div> <span style="white-space:pre-wrap">        </span>}</div>
<div><br></div><div> <span style="white-space:pre-wrap">        </span>net {</div><div> <span style="white-space:pre-wrap">                </span>allow-two-primaries;</div><div> <span style="white-space:pre-wrap">                </span>cram-hmac-alg sha1;</div>
<div> <span style="white-space:pre-wrap">                </span>shared-secret &quot;password&quot;;</div><div> <span style="white-space:pre-wrap">                </span>after-sb-0pri discard-zero-changes;</div><div> <span style="white-space:pre-wrap">                </span>after-sb-1pri discard-secondary;</div>
<div> <span style="white-space:pre-wrap">                </span>after-sb-2pri disconnect;</div><div> <span style="white-space:pre-wrap">        </span>}</div><div><br></div><div> <span style="white-space:pre-wrap">        </span>syncer {</div><div> <span style="white-space:pre-wrap">                </span>rate    100M;</div>
<div> <span style="white-space:pre-wrap">                </span>verify-alg      sha1;</div><div> <span style="white-space:pre-wrap">                </span>al-extents 257;</div><div> <span style="white-space:pre-wrap">        </span>}</div><div><br></div><div>
 <span style="white-space:pre-wrap">        </span>on nas1 {</div><div> <span style="white-space:pre-wrap">                </span>device /dev/drbd0;</div><div> <span style="white-space:pre-wrap">                </span>disk /dev/xvdb2;</div><div> <span style="white-space:pre-wrap">                </span>address <a href="http://192.168.10.21:7788/" target="_blank">192.168.10.21:7788</a>;</div>
<div> <span style="white-space:pre-wrap">                </span>meta-disk /dev/xvdb1[0];</div><div> <span style="white-space:pre-wrap">        </span>}</div><div><br></div><div> <span style="white-space:pre-wrap">        </span>on nas2 {</div><div> <span style="white-space:pre-wrap">                </span>device /dev/drbd0;</div>
<div> <span style="white-space:pre-wrap">                </span>disk /dev/xvdb2;</div><div> <span style="white-space:pre-wrap">                </span>address <a href="http://192.168.10.22:7788/" target="_blank">192.168.10.22:7788</a>;</div><div> <span style="white-space:pre-wrap">                </span>meta-disk /dev/xvdb1[0];</div>
<div> <span style="white-space:pre-wrap">        </span>}</div><div>}</div></div><div><br></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div></div><div><br></div><div>and configured cluster.conf as:</div></div></blockquote><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div>cluster:</div><div> node_count = 2</div><div> name = dcl</div></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div><div>node:</div><div> ip_port = 7777</div><div> ip_address = 192.168.10.21</div><div> number = 1</div><div> name = nas1</div><div> cluster = dcl</div><div><br></div><div>node:</div><div> ip_port = 7777</div>
<div> ip_address = 192.168.10.22</div><div> number = 2</div><div> name = nas2</div><div> cluster = dcl</div></div><div><br></div></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div><br></div><div>everything appears to be working fine. drbd-overview shows the device is connected as primary on both servers, i&#39;ve not noticed any problems at any time with the drbd configuration. </div>
<div><br></div><div>the drbd0 device was formatted using mkfs.ocfs2 -T mail /dev/drbd0</div><div>again everything seems fines. </div><div>i can mount the device (mount -t ocfs2 /dev/drbd0 /var/clustermount) on either server with no problems, unmount it, mount it on the other server, unmount it. i can do this repeatedly without errors. and echo &quot;slotmap&quot; | debugfs.ocfs2 -n /dev/drdb0 show the slotmap exactly as expected at any point. </div>
<div><br></div><div>when i have the cluster mounted on nas1, and try to simultaneously mount it on nas2, it takes a long time, causes disk activity (always on the same disk) to go through the roof, then i get a pingack not received in time message, nas1 is forcibly rebooted, and /dev/drbd0 gets successfully mounted on nas2. </div>
<div>when nas1 is rebooted, i can mount it, and the slotmap shows the cluster successfully mounted on both servers. </div><div>if i try mounting to both servers in any of way it fails, eg, mount to nas2 first, then mount to nas1, nas2 gets rebooted, it may or may not succesfully mount on nas1, if it was successful, trying to mount it on nas2 after it&#39;s reboot will forcibly reboot nas1. </div>
<div><br></div><div>anyone have any idea what could be going on here? cause it&#39;s doing my head in.</div><div><br></div><div>just in case it&#39;s relevant, these 2 servers are virtualized servers on xenserver 6.2 for testing purposes, once testing is successful the configuration will be installed on identical physical servers.</div>
<div><br></div><div>also can anyone confirm, if i get this working properly, if i export the ocfs2 cluster to an 20 node apache server farm using nfs, concurrent writes to /var/www/vhosts/*/logs/*.log will work ok? or will each apache node need to be a part of the cluster configuration?</div>
<div><br></div><div><br></div><div>thanks</div><font color="#888888"><div style="font-family:arial,sans-serif;font-size:13px">lee.</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div></font></div></blockquote>
</div></div>