<div dir="ltr"><pre>Thanks, Lars<br><br>But heartbeat did not configure dopd.<br></pre><br>Here is drbd.conf<br><br><i>resource r0 {<br><br> protocol C;<br><br> handlers<br> {<br> pri-on-incon-degr "echo '!DRBD! pri on incon-degr' | wall ; sleep 60 ; halt -f";<br>
}<br><br> startup {<br> wfc-timeout 120;<br><br> degr-wfc-timeout 120; # 2 minutes.<br> }<br><br> disk {<br> on-io-error detach;<br><br> fencing resource-only;<br> no-disk-flushes;<br> no-md-flushes;<br>
}<br><br> net {<br> after-sb-0pri discard-older-primary;<br> after-sb-1pri call-pri-lost-after-sb;<br> after-sb-2pri call-pri-lost-after-sb;<br> }<br><br> syncer {<br> rate 10M;<br><br> al-extents 257;<br>
}<br><br> on register1 {<br> device /dev/drbd0;<br> disk /dev/md1;<br> address <a href="http://192.168.3.196:7788">192.168.3.196:7788</a>;<br> meta-disk internal;<br> }<br><br> on register3 {<br>
device /dev/drbd0;<br> disk /dev/md1;<br> address <a href="http://192.168.3.195:7788">192.168.3.195:7788</a>;<br> meta-disk internal;<br> }<br>}</i><br><br><br><a href="http://ha.cf">ha.cf</a>:<br>
<i>debugfile /var/log/ha-debug<br>logfile /var/log/ha-log<br>logfacility local0<br>keepalive 2<br>deadtime 30<br>warntime 10<br>initdead 120<br>serial /dev/ttyS0<br>#udpport 694<br>#bcast eth1 #local heartbeat eth<br>
auto_failback on<br>node register1 ## make sure both names are accessible - check /etc/hosts<br>node register3<br>#ping <a href="http://192.168.100.1">192.168.100.1</a> ## peer node ipaddress<br>apiauth ipfail gid=haclient uid=hacluster</i><br>
<br><br>haresources:<br><i>register1 LVSSyncDaemonSwap::master IPaddr::<a href="http://192.168.3.197/24/eth0">192.168.3.197/24/eth0</a> drbddisk::r0 Filesystem::/dev/drbd0::/mydisk/opt/data::ext3 mysql jettyd</i><br><br>
<br>ha-debug:<br><br><i>heartbeat: 2008/07/30_11:59:38 debug: StartNextRemoteRscReq(): child count 2<br>heartbeat: 2008/07/30_11:59:38 debug: StartNextRemoteRscReq(): child count 1<br>heartbeat: 2008/07/30_11:59:38 debug: notify_world: setting SIGCHLD Handler to SIG_DFL<br>
heartbeat: 2008/07/30_11:59:39 debug: Starting /etc/ha.d/resource.d/LVSSyncDaemonSwap master start<br>heartbeat: 2008/07/30_11:59:39 debug: /etc/ha.d/resource.d/LVSSyncDaemonSwap master start done. RC=0<br>heartbeat: 2008/07/30_11:59:39 debug: Starting /etc/ha.d/resource.d/IPaddr <a href="http://192.168.3.197/24/eth0">192.168.3.197/24/eth0</a> start<br>
ls: cannot access /var/lib/heartbeat/rsctmp/IPaddr/eth0:*: No such file or directory<br>heartbeat: 2008/07/30_11:59:39 debug: /etc/ha.d/resource.d/IPaddr <a href="http://192.168.3.197/24/eth0">192.168.3.197/24/eth0</a> start done. RC=0<br>
heartbeat: 2008/07/30_11:59:39 debug: Starting /etc/ha.d/resource.d/drbddisk r0 start<br>/dev/drbd0: State change failed: (-2) Refusing to be Primary without at least one UpToDate disk<br>Command '/sbin/drbdsetup /dev/drbd0 primary' terminated with exit code 17<br>
</i><br><br><br><div class="gmail_quote">On Wed, Jul 30, 2008 at 7:44 PM, richard chou <span dir="ltr"><<a href="mailto:zxb1345@gmail.com">zxb1345@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr"><pre>I have a two-server DRBD primary/secondary configuration, running<br>Heartbeat. Heartbeat will management two resources: jetty(light-weight <br>http/https server) and mysql.<br><br>If both servers start, jetty and mysql will work well in primary server.<br>
But if only one server starts, heartbeat will output error message as following:<br><br><i>heartbeat: 2008/07/30_09:15:23 debug: Starting /etc/ha.d/resource.d/drbddisk r0 start<br>/dev/drbd0: State change failed: (-2) Refusing to be Primary without at least one UpToDate disk<br>
Command '/sbin/drbdsetup /dev/drbd0 primary' terminated with exit code 17<br></i><br>I check the status of DRBD,<br>#cat /proc/drbd<br><i><i><b>version: 8.0.12 (api:86/proto:86)<br><br> 0: cs:WFConnection st:Secondary/Unknown ds:Consistent/DUnknown C r---<br>
ns:0 nr:0 dw:0 dr:0 al:0 bm:7 lo:0 pe:0 ua:0 ap:0<br> resync: used:0/61 hits:0 misses:0 starving:0 dirty:0 changed:0<br> act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0 changed:0<br></b></i></i><i><b><i><span style="font-size: 10.5pt;" lang="EN-US"><br>
</span></i></b></i><i><span style="font-size: 10.5pt;" lang="EN-US">How can I start jetty and mysql if only one server starts?<br></span></i><br>Thanks for your help!</pre></div>
</blockquote></div><br></div>