<div dir="ltr">Hello.<div><br></div><div>Ubuntu 14.04, corosync 2.3.3, pacemaker 1.1.10. The cluster consists of 2 nodes (node1 and node2), when I run "crm node standby node2" and then, in a minute, "crm node online node2", DRBD secondary on node2 does not start. Logs say that "drbdadm -c /etc/drbd.conf check-resize vlv" fails with an error message: "No valid meta data found" on the onlining node. And, surprisingly, after I run "service drbd start" on node2 manually, everything becomes fine.</div><div><br></div><div>Maybe something is broken in /usr/lib/ocf/resource.d/linbit/drbd, why cannot it start DRBD? Or I am misconfigured somehow? Could you please give an advice what to do?</div><div><br></div><div>I have the following configuration (drbd + mount + postgresql, but postgresql is innocent here, so just ignore it):</div><div><br></div><div><div><font size="1"><b>root@node2:/var/log#</b> crm configure show</font></div><div><font size="1">node $id="1017525950" node2 a</font><span style="font-size:x-small">ttributes standby="off"</span></div><div><font size="1">node $id="1760315215" node1</font></div><div><font size="1">primitive drbd ocf:linbit:drbd \</font></div><div><font size="1"><span style="white-space:pre-wrap">     </span>params drbd_resource="vlv" \</font></div><div><font size="1"><span style="white-space:pre-wrap">       </span>op start interval="0" timeout="240" \</font></div><div><font size="1"><span style="white-space:pre-wrap">    </span>op stop interval="0" timeout="120"</font></div><div><font size="1">primitive fs ocf:heartbeat:Filesystem \</font></div><div><font size="1"><span style="white-space:pre-wrap">     </span>params device="/dev/drbd0" directory="/var/lib/vlv.drbd/root" options="noatime,nodiratime" fstype="xfs" \</font></div><div><font size="1"><span style="white-space:pre-wrap">    </span>op start interval="0" timeout="300" \</font></div><div><font size="1"><span style="white-space:pre-wrap">    </span>op stop interval="0" timeout="300"</font></div><div><font size="1">primitive postgresql lsb:postgresql \</font></div><div><font size="1"><span style="white-space:pre-wrap">       </span>op monitor interval="4" timeout="60" \</font></div><div><font size="1"><span style="white-space:pre-wrap">   </span>op start interval="0" timeout="60" \</font></div><div><font size="1"><span style="white-space:pre-wrap">     </span>op stop interval="0" timeout="60"</font></div><div><font size="1">group pgserver fs postgresql</font></div><div><font size="1">ms ms_drbd drbd \</font></div><div><font size="1"><span style="white-space:pre-wrap">     </span>meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"</font></div><div><font size="1">location cli-prefer-pgserver pgserver inf: node1</font></div><div><font size="1">colocation col_pgserver inf: pgserver ms_drbd:Master</font></div><div><font size="1">order ord_pgserver inf: ms_drbd:promote pgserver:start</font></div><div><font size="1">property $id="cib-bootstrap-options" </font><font size="1">dc-version="1.1.10-42f2063" </font><span style="font-size:x-small">cluster-infrastructure="corosync"<br></span><span style="font-size:x-small;white-space:pre-wrap">      </span><span style="font-size:x-small">stonith-enabled="false" </span><span style="font-size:x-small">no-quorum-policy="ignore" </span><span style="font-size:x-small">last-lrm-refresh="1420304078"</span></div><div><font size="1">rsc_defaults $id="rsc-options" \</font></div><div><font size="1"><span style="white-space:pre-wrap">       </span>resource-stickiness="100"</font></div></div><div><font size="1"><br></font></div><div><font size="1"><br></font></div>The cluster and DRBD statuses on node2 look healthy:<div><div><br></div><div><br></div><div><div><font size="1"><b>root@node2:/var/log#</b> crm status</font></div><div><font size="1">...</font></div><div><font size="1">Online: [ node1 node2 ]</font></div><div><font size="1"> Master/Slave Set: ms_drbd [drbd]</font></div><div><font size="1">     Masters: [ node1 ]</font></div><div><font size="1">     Slaves: [ node2 ]</font></div><div><font size="1"> Resource Group: pgserver</font></div><div><font size="1">     fs<span style="white-space:pre-wrap">      </span>(ocf::heartbeat:Filesystem):<span style="white-space:pre-wrap">    </span>Started node1</font></div><div><font size="1">     postgresql<span style="white-space:pre-wrap">      </span>(lsb:postgresql):<span style="white-space:pre-wrap">       </span>Started node1</font></div></div><div><br></div><div><div><font size="1"><b>root@node2:/var/log#</b> cat /proc/drbd</font></div><div><font size="1">version: 8.4.3 (api:1/proto:86-101)</font></div><div><font size="1">srcversion: F97798065516C94BE0F27DC</font></div><div><font size="1"> 0: cs:Connected ro:Secondary/Primary ds:Diskless/UpToDate C r-----</font></div><div><font size="1">    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0</font></div></div><div><br></div><div><br></div><div>Now I switch node2 to standby and verify that DRBD on it has really shot down:</div><div><br></div><div><br></div><div><font size="1"><b>root@node1:/etc/rc2.d#</b> crm node standby node2<br></font></div><div><div><font size="1"><b>root@node2:/var/log#</b> cat /proc/drbd</font></div><div><font size="1">version: 8.4.3 (api:1/proto:86-101)</font></div><div><font size="1">srcversion: F97798065516C94BE0F27DC</font></div></div><div><b style="font-size:x-small">root@node2:/var/log#</b><br></div><div><b style="font-size:x-small"><br></b></div><div>Then I switch node2 back online and see that DRBD has not been initialized and reattached again!</div><div><br></div><div><div><font size="1"><b>root@node2:/var/log#</b> >syslog</font></div></div><div><font size="1"><b>root@node1:/etc#</b> crm node online node2<br></font></div><div><div><font size="1"><b>root@node2:/var/log#</b> crm status</font></div><div><font size="1">...</font></div><div><font size="1">Online: [ node1 node2 ]</font></div><div><font size="1"> Master/Slave Set: ms_drbd [drbd]</font></div><div><font size="1">     Masters: [ node1 ]</font></div><div><font size="1">     Stopped: [ node2 ]</font></div><div><font size="1"> Resource Group: pgserver</font></div><div><font size="1">     fs<span style="white-space:pre-wrap">        </span>(ocf::heartbeat:Filesystem):<span style="white-space:pre-wrap">    </span>Started node1</font></div><div><font size="1">     postgresql<span style="white-space:pre-wrap">      </span>(lsb:postgresql):<span style="white-space:pre-wrap">       </span>Started node1</font></div><div><font size="1">Failed actions:</font></div><div><font size="1">    drbd_start_0 (node=node2, call=81, rc=1, status=complete, last-rc-change=Sat Jan  3 12:05:32 2015</font></div><div><font size="1">, queued=1118ms, exec=0ms</font></div><div><font size="1">): unknown error</font></div></div><div><font size="1"><br></font></div><div><div><font size="1"><b>root@node2:/var/log#</b> cat syslog | head -n 30</font></div><div><font size="1">Jan  3 12:05:31 node2 crmd[918]:   notice: do_state_transition: State transition S_IDLE -> S_POLICY_ENGINE [ input=I_PE_CALC cause=C_FSA_INTERNAL origin=abort_transition_graph ]</font></div><div><font size="1">Jan  3 12:05:31 node2 cib[913]:   notice: cib:diff: Diff: --- 0.29.3</font></div><div><font size="1">Jan  3 12:05:31 node2 cib[913]:   notice: cib:diff: Diff: +++ 0.30.1 027344551b46745123e4a52562e55974</font></div><div><font size="1">Jan  3 12:05:31 node2 pengine[917]:   notice: unpack_config: On loss of CCM Quorum: Ignore</font></div><div><font size="1">Jan  3 12:05:31 node2 pengine[917]:   notice: LogActions: Start   drbd:1#011(node2)</font></div><div><font size="1">Jan  3 12:05:31 node2 crmd[918]:   notice: te_rsc_command: Initiating action 46: notify drbd_pre_notify_start_0 on node1</font></div><div><font size="1">Jan  3 12:05:31 node2 pengine[917]:   notice: process_pe_message: Calculated Transition 11: /var/lib/pacemaker/pengine/pe-input-11.bz2</font></div><div><font size="1">Jan  3 12:05:32 node2 crmd[918]:   notice: te_rsc_command: Initiating action 10: start drbd:1_start_0 on node2 (local)</font></div><div><font size="1">Jan  3 12:05:32 node2 drbd(drbd)[1931]: ERROR: vlv: Called drbdadm -c /etc/drbd.conf check-resize vlv</font></div><div><font size="1">Jan  3 12:05:32 node2 drbd(drbd)[1931]: ERROR: vlv: Exit code 255</font></div><div><font size="1">Jan  3 12:05:32 node2 drbd(drbd)[1931]: ERROR: vlv: Command output:</font></div><div><font size="1">Jan  3 12:05:32 node2 drbd(drbd)[1931]: ERROR: vlv: Called drbdadm -c /etc/drbd.conf --peer node1 attach vlv</font></div><div><font size="1">Jan  3 12:05:32 node2 drbd(drbd)[1931]: ERROR: vlv: Exit code 255</font></div><div><font size="1">Jan  3 12:05:32 node2 drbd(drbd)[1931]: ERROR: vlv: Command output:</font></div><div><font size="1">Jan  3 12:05:33 node2 drbd(drbd)[1931]: ERROR: vlv: Called drbdadm -c /etc/drbd.conf --peer node1 attach vlv</font></div><div><font size="1">Jan  3 12:05:33 node2 drbd(drbd)[1931]: ERROR: vlv: Exit code 255</font></div><div><font size="1">Jan  3 12:05:33 node2 drbd(drbd)[1931]: ERROR: vlv: Command output:</font></div><div><font size="1">Jan  3 12:05:33 node2 lrmd[915]:   notice: operation_finished: drbd_start_0:1931:stderr [ no suitable meta data found :( ]</font></div><div><font size="1">Jan  3 12:05:33 node2 lrmd[915]:   notice: operation_finished: drbd_start_0:1931:stderr [ Command 'drbdmeta 0 v08 /dev/loop0 internal check-resize' terminated with exit code 255 ]</font></div><div><font size="1">Jan  3 12:05:33 node2 lrmd[915]:   notice: operation_finished: drbd_start_0:1931:stderr [ No valid meta data found ]</font></div><div><font size="1">Jan  3 12:05:33 node2 lrmd[915]:   notice: operation_finished: drbd_start_0:1931:stderr [ Command 'drbdmeta 0 v08 /dev/loop0 internal apply-al' terminated with exit code 255 ]</font></div><div><font size="1">Jan  3 12:05:33 node2 lrmd[915]:   notice: operation_finished: drbd_start_0:1931:stderr [ No valid meta data found ]</font></div><div><font size="1">Jan  3 12:05:33 node2 lrmd[915]:   notice: operation_finished: drbd_start_0:1931:stderr [ Command 'drbdmeta 0 v08 /dev/loop0 internal apply-al' terminated with exit code 255 ]</font></div><div><font size="1">Jan  3 12:05:33 node2 crmd[918]:   notice: process_lrm_event: LRM operation drbd_start_0 (call=81, rc=1, cib-update=79, confirmed=true) unknown error</font></div><div><font size="1">Jan  3 12:05:33 node2 crmd[918]:   notice: process_lrm_event: node2-drbd_start_0:81 [ \n\n\n\n\n\n\n ]</font></div><div><font size="1">Jan  3 12:05:33 node2 crmd[918]:  warning: status_from_rc: Action 10 (drbd:1_start_0) on node2 failed (target: 0 vs. rc: 1): Error</font></div><div><font size="1">Jan  3 12:05:33 node2 crmd[918]:  warning: update_failcount: Updating failcount for drbd on node2 after failed start: rc=1 (update=INFINITY, time=1420304733)</font></div><div><font size="1">Jan  3 12:05:33 node2 attrd[916]:   notice: attrd_trigger_update: Sending flush op to all hosts for: fail-count-drbd (INFINITY)</font></div><div><font size="1">Jan  3 12:05:33 node2 attrd[916]:   notice: attrd_perform_update: Sent update 60: fail-count-drbd=INFINITY</font></div><div><font size="1">Jan  3 12:05:33 node2 attrd[916]:   notice: attrd_trigger_update: Sending flush op to all hosts for: last-failure-drbd (1420304733)</font></div></div><div><font size="1"><br></font></div><div><div><font size="1">root@node2:/var/log# cat syslog | grep ERROR | head -n 30</font></div><div><font size="1">Jan  3 12:05:32 node2 drbd(drbd)[1931]: ERROR: vlv: Called drbdadm -c /etc/drbd.conf check-resize vlv</font></div><div><font size="1">Jan  3 12:05:32 node2 drbd(drbd)[1931]: ERROR: vlv: Exit code 255</font></div><div><font size="1">Jan  3 12:05:32 node2 drbd(drbd)[1931]: ERROR: vlv: Command output:</font></div><div><font size="1">Jan  3 12:05:32 node2 drbd(drbd)[1931]: ERROR: vlv: Called drbdadm -c /etc/drbd.conf --peer node1 attach vlv</font></div><div><font size="1">Jan  3 12:05:32 node2 drbd(drbd)[1931]: ERROR: vlv: Exit code 255</font></div><div><font size="1">Jan  3 12:05:32 node2 drbd(drbd)[1931]: ERROR: vlv: Command output:</font></div><div><font size="1">Jan  3 12:05:33 node2 drbd(drbd)[1931]: ERROR: vlv: Called drbdadm -c /etc/drbd.conf --peer node1 attach vlv</font></div><div><font size="1">Jan  3 12:05:33 node2 drbd(drbd)[1931]: ERROR: vlv: Exit code 255</font></div><div><font size="1">Jan  3 12:05:33 node2 drbd(drbd)[1931]: ERROR: vlv: Command output:</font></div><div><font size="1">Jan  3 12:05:33 node2 drbd(drbd)[2021]: ERROR: vlv: Called drbdadm -c /etc/drbd.conf --peer node1 -v adjust vlv</font></div><div><font size="1">Jan  3 12:05:33 node2 drbd(drbd)[2021]: ERROR: vlv: Exit code 1</font></div><div><font size="1">Jan  3 12:05:33 node2 drbd(drbd)[2021]: ERROR: vlv: Command output: drbdmeta 0 v08 /dev/loop0 internal apply-al</font></div></div><div><br></div><div><br></div><div>Here's the DRBD config file:</div><div><br></div><div><br></div><div><div><font size="1"><b>root@node2:/var/log#</b> cat /etc/drbd.d/drbd.res</font></div><div><font size="1">resource vlv {</font></div><div><font size="1">  device /dev/drbd0;</font></div><div><font size="1">  disk /dev/loop0;</font></div><div><font size="1">  meta-disk internal;</font></div><div><font size="1">  syncer { rate 150M; verify-alg md5; }</font></div><div><font size="1">  on node1 { address x.x.x.x:7788; }</font></div><div><font size="1">  on node2 { address y.y.y.y:7788; }</font></div><div><font size="1">}</font></div></div><div><font size="1"><br></font></div></div><div><div><font size="1"><b>root@node2:/var/log#</b> losetup -a</font></div><div><font size="1">/dev/loop0: [fd01]:1314858 (/var/lib/vlv.drbd/vlv.img)</font></div></div><div><br></div><div><br></div></div>