<div dir="ltr"><div>guys .. I'm in big trouble here ...</div><div><br></div><div>My heartbeat is changing from one server to another in loop.</div><div><br></div><div>The following configuration files</div><div><br></div>
<div><div>root@servidor-01:~# cat /etc/drbd.conf</div><div>global {</div><div> usage-count no;</div><div>}</div><div><br></div><div>resource r0 {</div><div><br></div><div> protocol C;</div><div><br></div><div>
startup {</div><div> wfc-timeout 30;</div><div> degr-wfc-timeout 120;</div><div> }</div><div><br></div><div> disk {</div><div> on-io-error detach;</div><div>
}</div><div><br></div><div> syncer {</div><div> rate 600M;</div><div> }</div><div><br></div><div> on servidor-01 {</div><div> device /dev/drbd0;</div><div>
disk /dev/mapper/DRBD-APP;</div><div> address <a href="http://172.16.1.1:7788">172.16.1.1:7788</a>;</div><div> meta-disk internal;</div><div> }</div>
<div><br></div><div> on servidor-02 {</div><div> device /dev/drbd0;</div><div> disk /dev/mapper/DRBD-APP;</div><div> address <a href="http://172.16.1.2:7788">172.16.1.2:7788</a>;</div>
<div> meta-disk internal;</div><div> }</div><div>}</div><div><br></div><div>resource r1 {</div><div><br></div><div> protocol C;</div><div><br></div><div> startup {</div><div> wfc-timeout 30;</div>
<div> degr-wfc-timeout 120;</div><div> }</div><div><br></div><div> disk {</div><div> on-io-error detach;</div><div> }</div><div><br></div><div> syncer {</div><div>
rate 600M;</div><div> }</div><div><br></div><div> on servidor-01 {</div><div> device /dev/drbd1;</div><div> disk /dev/mapper/ORACLE-DB;</div>
<div> address <a href="http://172.16.1.1:7789">172.16.1.1:7789</a>;</div><div> meta-disk internal;</div><div> }</div><div><br></div><div> on servidor-02 {</div><div>
device /dev/drbd1;</div><div> disk /dev/mapper/ORACLE-DB;</div><div> address <a href="http://172.16.1.2:7789">172.16.1.2:7789</a>;</div><div> meta-disk internal;</div>
<div> }</div><div><br></div><div>}</div></div><div><br></div><div><div>root@servidor-01:~# cat /etc/ha.d/<a href="http://ha.cf">ha.cf</a></div><div>logfacility local0</div><div>keepalive 2</div><div>deadtime 20</div>
<div>warntime 10</div><div>initdead 60</div><div>ucast eth1 172.16.1.2</div><div>auto_failback off</div><div>node Servidor-01</div><div>node Servidor-02</div><div>ping 192.168.1.1 192.168.1.5</div><div>apiauth pingd uid=hacluster</div>
<div>respawn hacluster /usr/lib/heartbeat/pingd -m 100 -d 5s</div><div>#respawn hacluster /usr/lib/heartbeat/ipfail</div><div>deadping 20</div><div>debug 0</div><div>debugfile /var/log/ha-debug</div></div><div><br></div><div>
<div>root@servidor-01:~# cat /etc/ha.d/haresources</div><div>servidor-01 10.10.10.28 drbddisk::r0 Filesystem::/dev/drbd0::/VBI::xfs drbddisk::r1 Filesystem::/dev/drbd1::/usr/lib/oracle::xfs oracle-xe MacFloating ArPing mon</div>
<div>root@servidor-01:~#</div></div><div><br></div><div><div>root@servidor-01:/etc/ha.d/resource.d# cat MacFloating</div><div>#!/bin/bash</div><div><br></div><div><br></div><div>#</div><div># Process</div><div>case $1 in</div>
<div> start)</div><div><br></div><div> sudo macchanger -m 2a:45:aa:a6:aa:7d eth0</div><div><br></div><div> #sudo arping -c 3 -I eth0:0 10.10.10.28</div><div><br></div><div> ;;</div><div><br></div>
<div> stop)</div><div><br></div><div> sudo macchanger -m f6:8b:0d:1f:2a:e5 eth0</div><div><br></div><div><br></div><div> #sudo arping -c 3 -I eth0 10.10.10.26</div><div><br></div><div> ;;</div>
<div> status)</div><div> ifconfig</div><div> ;;</div><div><br></div><div> *)</div><div> echo "Usage: $0 start|stop|status"</div><div> exit 2</div>
<div> ;;</div><div>esac</div><div>exit 0</div></div><div><br></div><div><div>root@servidor-01:/etc/ha.d/resource.d# cat ArPing</div><div>#!/bin/bash</div><div><br></div><div>ARPING=`which arping`</div><div>
SUDO=`which sudo`</div><div><br></div><div>#</div><div># Process</div><div>case $1 in</div><div> start)</div><div> sleep 2</div><div><br></div><div> $SUDO $ARPING -c 2 -I eth0 10.10.10.26</div><div> $SUDO $ARPING -c 2 -I eth0:0 10.10.10.28</div>
<div><br></div><div> ;;</div><div><br></div><div> stop)</div><div><br></div><div> sleep 2</div><div> $SUDO $ARPING -c 2 -I eth0 10.10.10.26</div><div><br></div><div> ;;</div><div> status)</div>
<div> ifconfig</div><div> ;;</div><div><br></div><div> *)</div><div> echo "Usage: $0 start|stop|status"</div><div> exit 2</div><div> ;;</div>
<div>esac</div><div>exit 0</div></div><div><br></div><div>=====================</div><div>Logs</div><div><br></div><div>Log server 01</div><div><br></div><div><div>Sep 24 12:21:51 servidor-01 heartbeat: [1681]: info: servidor-02 wants to go standby [all]</div>
<div>Sep 24 12:22:01 servidor-01 heartbeat: [1681]: info: standby: acquire [all] resources from servidor-02</div><div>Sep 24 12:22:01 servidor-01 heartbeat: [20239]: info: acquire all HA resources (standby).</div><div>ResourceManager[20253]: 2013/09/24_12:22:02 info: Acquiring resource group: servidor-01 10.10.10.28 drbddisk::r0 Filesystem::/dev/drbd0::/VBI::xfs drbddisk::r1 Filesystem::/dev/drbd1::/usr/lib/oracle::xfs oracle-xe MacFloating ArPing mon</div>
<div>IPaddr[20280]: 2013/09/24_12:22:02 INFO: Resource is stopped</div><div>ResourceManager[20253]: 2013/09/24_12:22:02 info: Running /etc/ha.d/resource.d/IPaddr 10.10.10.28 start</div><div>IPaddr[20338]: 2013/09/24_12:22:02 INFO: Using calculated nic for <a href="http://10.10.10.28">10.10.10.28</a>: eth0</div>
<div>IPaddr[20338]: 2013/09/24_12:22:02 INFO: Using calculated netmask for <a href="http://10.10.10.28">10.10.10.28</a>: 255.255.255.192</div><div>IPaddr[20338]: 2013/09/24_12:22:02 INFO: eval ifconfig eth0:0 10.10.10.28 netmask 255.255.255.192 broadcast 10.10.10.63</div>
<div>IPaddr[20326]: 2013/09/24_12:22:02 INFO: Success</div><div>INFO: Success</div><div>ResourceManager[20253]: 2013/09/24_12:22:02 info: Running /etc/ha.d/resource.d/drbddisk r0 start</div><div>Filesystem[20476]: 2013/09/24_12:22:02 INFO: Resource is stopped</div>
<div>ResourceManager[20253]: 2013/09/24_12:22:02 info: Running /etc/ha.d/resource.d/Filesystem /dev/drbd0 /VBI xfs start</div><div>Filesystem[20552]: 2013/09/24_12:22:02 INFO: Running start for /dev/drbd0 on /VBI</div>
<div>FATAL: Module scsi_hostadapter not found.</div><div>Filesystem[20546]: 2013/09/24_12:22:02 INFO: Success</div><div>INFO: Success</div><div>ResourceManager[20253]: 2013/09/24_12:22:02 info: Running /etc/ha.d/resource.d/drbddisk r1 start</div>
<div>Filesystem[20658]: 2013/09/24_12:22:02 INFO: Resource is stopped</div><div>ResourceManager[20253]: 2013/09/24_12:22:02 info: Running /etc/ha.d/resource.d/Filesystem /dev/drbd1 /usr/lib/oracle xfs start</div><div>
Filesystem[20734]: 2013/09/24_12:22:02 INFO: Running start for /dev/drbd1 on /usr/lib/oracle</div><div>FATAL: Module scsi_hostadapter not found.</div><div>Filesystem[20728]: 2013/09/24_12:22:04 INFO: Success</div>
<div>INFO: Success</div><div>ResourceManager[20253]: 2013/09/24_12:22:04 info: Running /etc/ha.d/resource.d/oracle-xe start</div><div>Starting Oracle Net Listener.</div><div>Starting Oracle Database 10g Express Edition Instance.</div>
<div><br></div><div>ResourceManager[20253]: 2013/09/24_12:22:13 info: Running /etc/ha.d/resource.d/MacFloating start</div><div>Current MAC: f6:8b:0d:1f:2a:e5 (unknown)</div><div>Faked MAC: 2a:45:aa:a6:aa:7d (unknown)</div>
<div>ResourceManager[20253]: 2013/09/24_12:22:13 info: Running /etc/ha.d/resource.d/ArPing start</div><div>ARPING 10.10.10.26</div><div><br></div><div>--- 10.10.10.26 statistics ---</div><div>2 packets transmitted, 0 packets received, 100% unanswered (0 extra)</div>
<div>ARPING 10.10.10.28</div><div><br></div><div>--- 10.10.10.28 statistics ---</div><div>2 packets transmitted, 0 packets received, 100% unanswered (0 extra)</div><div>ResourceManager[20253]: 2013/09/24_12:22:20 info: Running /etc/ha.d/resource.d/mon start</div>
<div>Starting mon daemon : mon.</div><div>Sep 24 12:22:21 servidor-01 heartbeat: [20239]: info: all HA resource acquisition completed (standby).</div><div>Sep 24 12:22:21 servidor-01 heartbeat: [1681]: info: Standby resource acquisition done [all].</div>
<div>Sep 24 12:22:21 servidor-01 heartbeat: [1681]: info: remote resource transition completed.</div></div><div><br></div><div>Log Server 02</div><div><br></div><div><div>Sep 24 12:22:48 servidor-02 heartbeat: [1680]: info: standby: acquire [all] resources from servidor-01</div>
<div>Sep 24 12:22:48 servidor-02 heartbeat: [1642]: info: acquire all HA resources (standby).</div><div>ResourceManager[1656]: 2013/09/24_12:22:48 info: Acquiring resource group: servidor-01 10.10.10.28 drbddisk::r0 Filesystem::/dev/drbd0::/VBI::xfs drbddisk::r1 Filesystem::/dev/drbd1::/usr/lib/oracle::xfs oracle-xe MacFloating ArPing mon</div>
<div>IPaddr[1685]: 2013/09/24_12:22:48 INFO: Resource is stopped</div><div>ResourceManager[1656]: 2013/09/24_12:22:49 info: Running /etc/ha.d/resource.d/IPaddr 10.10.10.28 start</div><div>IPaddr[1751]: 2013/09/24_12:22:49 INFO: Using calculated nic for <a href="http://10.10.10.28">10.10.10.28</a>: eth0</div>
<div>IPaddr[1751]: 2013/09/24_12:22:49 INFO: Using calculated netmask for <a href="http://10.10.10.28">10.10.10.28</a>: 255.255.255.192</div><div>IPaddr[1751]: 2013/09/24_12:22:49 INFO: eval ifconfig eth0:0 10.10.10.28 netmask 255.255.255.192 broadcast 10.10.10.63</div>
<div>IPaddr[1738]: 2013/09/24_12:22:49 INFO: Success</div><div>INFO: Success</div><div>ResourceManager[1656]: 2013/09/24_12:22:49 info: Running /etc/ha.d/resource.d/drbddisk r0 start</div><div>Filesystem[1901]: 2013/09/24_12:22:49 INFO: Resource is stopped</div>
<div>ResourceManager[1656]: 2013/09/24_12:22:49 info: Running /etc/ha.d/resource.d/Filesystem /dev/drbd0 /VBI xfs start</div><div>Filesystem[1977]: 2013/09/24_12:22:49 INFO: Running start for /dev/drbd0 on /VBI</div>
<div>FATAL: Module scsi_hostadapter not found.</div><div>Filesystem[1971]: 2013/09/24_12:22:49 INFO: Success</div><div>INFO: Success</div><div>ResourceManager[1656]: 2013/09/24_12:22:49 info: Running /etc/ha.d/resource.d/drbddisk r1 start</div>
<div>Filesystem[2084]: 2013/09/24_12:22:49 INFO: Resource is stopped</div><div>ResourceManager[1656]: 2013/09/24_12:22:49 info: Running /etc/ha.d/resource.d/Filesystem /dev/drbd1 /usr/lib/oracle xfs start</div><div>
Filesystem[2159]: 2013/09/24_12:22:49 INFO: Running start for /dev/drbd1 on /usr/lib/oracle</div><div>FATAL: Module scsi_hostadapter not found.</div><div>Filesystem[2153]: 2013/09/24_12:22:51 INFO: Success</div>
<div>INFO: Success</div><div>ResourceManager[1656]: 2013/09/24_12:22:51 info: Running /etc/ha.d/resource.d/oracle-xe start</div><div>Starting Oracle Net Listener.</div><div>Starting Oracle Database 10g Express Edition Instance.</div>
<div><br></div><div>ResourceManager[1656]: 2013/09/24_12:23:00 info: Running /etc/ha.d/resource.d/MacFloating start</div><div>Current MAC: 78:31:2f:bd:7c:2c (unknown)</div><div>Faked MAC: 2a:45:aa:a6:aa:7d (unknown)</div>
<div>ResourceManager[1656]: 2013/09/24_12:23:00 info: Running /etc/ha.d/resource.d/ArPing start</div><div>ARPING 10.10.10.27</div><div><br></div><div>--- 10.10.10.27 statistics ---</div><div>2 packets transmitted, 0 packets received, 100% unanswered (0 extra)</div>
<div>ARPING 10.10.10.28</div><div><br></div><div>--- 10.10.10.28 statistics ---</div><div>2 packets transmitted, 0 packets received, 100% unanswered (0 extra)</div><div>ResourceManager[1656]: 2013/09/24_12:23:07 info: Running /etc/ha.d/resource.d/mon start</div>
<div>Starting mon daemon : mon.</div><div>Sep 24 12:23:08 servidor-02 heartbeat: [1642]: info: all HA resource acquisition completed (standby).</div><div>Sep 24 12:23:08 servidor-02 heartbeat: [1680]: info: Standby resource acquisition done [all].</div>
<div>Sep 24 12:23:08 servidor-02 heartbeat: [1680]: info: remote resource transition completed.</div></div><div><br></div><div><br></div><div><div dir="ltr"><div>--<br></div><div><br></div><div><img src="http://www.evoluservices.com/images/assinatura.jpg" style="color: rgb(136, 136, 136);"><br style="color:rgb(136,136,136)">
<div style="color:rgb(136,136,136)"><br></div><div><div><b style="color:rgb(136,136,136)"><u>Bruno Medico • Administrador de Redes<br></u></b><div style="color:rgb(136,136,136)"><b><u>(11) 3014-8628</u></b></div><div style="color:rgb(136,136,136)">
<span style="color:rgb(0,0,0);font-family:sans-serif;line-height:19.1875px"><br></span></div><div><span style="font-family:sans-serif;line-height:19.1875px"><font size="1" color="#999999">"Por causa do ferreiro, perdeu-se o prego; por causa do prego, perdeu-se a ferradura; por causa da ferradura, perdeu-se o cavalo; por causa do cavalo, perdeu-se o mensageiro; por causa do mensageiro, perdeu-se a carta; por causa da carta, perdeu-se a guerra."</font></span></div>
</div></div></div><div><div dir="ltr"></div></div><span style="color:rgb(136,136,136)"><div><br></div></span></div></div>
</div>