Hello and thank you for reading this..<div><br></div><div>I have the following situation:</div><div>I have xen cloud running on 8 servers, and nfs+drbd+heartbeat on 2 fileservers.</div><div><br></div><div>The VM's get streamed from the NFS share, to the xen cloud. So far so good, this works great.</div>
<div><br></div><div>When server-1 fails, the virtual machines of the xen cloud keep on working perfectly, because well.. there is 1 primary server-2, with the correct data.</div><div>But! when i reconnect the other server, you get a split-brain, Now what i would like to do is, that server-2 stays the primary, server-1 get's synced again and stays secundary.</div>
<div>But what i see now, is that when i don't change files on the server, server-1 becomes primary and 2 becomes primary. The nfs share is offline for to long, and my VM's crash. </div><div>But when the data does change, while server-1 is down, server-2 stays primary, and server-1 reboots and become secundary.. This is what i want, but then for every network crash.</div>
<div><br></div><div>So what i basicly want is this: the server with the most up to data, stays primary, and the other one becomes secundary.</div><div><br></div><div>Anybody can help me with the config file i'm using? </div>
<div><br></div><div>Thanks,</div><div>Peter</div><div><br></div><div><br></div><div><b>I'm fully aware that this is bad to use, but it's a situation where people are unable to reach the servers when something goes wrong, so i need auto-recovery from split brain.</b></div>
<div><br></div><div>the config file:</div><div>nfs-1:~# cat /etc/drbd.conf </div><div><div>global {</div><div>usage-count yes;</div><div>}</div><div>common {</div><div> syncer { rate 10M; }</div><div>}</div><div><br></div>
<div>resource r0 {</div><div> protocol C;</div><div> handlers {</div><div> }</div><div> startup {</div><div> degr-wfc-timeout 10; # 2 minutes.</div><div> become-primary-on nfs-1;</div><div> }</div><div> disk {</div>
<div> on-io-error detach;</div><div> }</div><div><br></div><div> net {</div><div> after-sb-0pri discard-least-changes;</div><div> after-sb-1pri discard-secondary;</div><div> after-sb-2pri violently-as0p;</div>
<div> rr-conflict violently;</div><div> }</div><div><br></div><div> syncer {</div><div> rate 100M;</div><div> al-extents 257;</div><div> }</div><div><br></div><div>on nfs-1 {</div><div> device /dev/drbd0;</div>
<div> disk /dev/sdb1;</div><div> address <a href="http://10.100.255.9:7788">10.100.255.9:7788</a>;</div><div> meta-disk internal;</div><div> }</div><div><br></div><div>on nfs-2 {</div><div> device /dev/drbd0;</div>
<div> disk /dev/sdb1;</div><div> address <a href="http://10.100.255.10:7788">10.100.255.10:7788</a>;</div><div> meta-disk internal;</div><div> }</div><div>}</div><div>nfs-1:~# </div><div><br></div></div>