<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Arial; font-size: 10pt; color: #000000'><span>I have my DRBD resources on top of LVM2 in a Pacemaker cluster.<br>I have it setup to take a snapshot prior to resync and then remove after using the included scripts.<br>The snapshots are being taken but not removed after resync.<br><br>global_common.conf:<br><br> before-resync-target "/usr/lib/drbd/snapshot-resync-target-lvm.sh -p 15 -- -c 16k";<br> after-resync-target /usr/lib/drbd/unsnapshot-resync-target-lvm.sh;<br><br>If I put one node in standby and then bring it back online the proper scripts are invoked.</span><span id="b9552886-d25b-4636-9a83-7d42d9dc8f7d"> The "before" output is shown and the snapshots are created.</span><span id="b9552886-d25b-4636-9a83-7d42d9dc8f7d"> After the resync completes and the "after" script is invoked and returns no error but the output isn't shown /var/log/messages and the snapshot(s) are still there.<br><br><br>DRBD status is connected - Secondary/Primary.<br><br>messages:<br><br>Aug 8 16:08:09 Condor kernel: [2261509.078128] block drbd4: Starting worker thread (from cqueue [1597])<br>Aug 8 16:08:09 Condor kernel: [2261509.078199] block drbd4: disk( Diskless -> Attaching )<br>Aug 8 16:08:09 Condor kernel: [2261509.078667] block drbd4: Found 4 transactions (4 active extents) in activity log.<br>Aug 8 16:08:09 Condor kernel: [2261509.078671] block drbd4: Method to ensure write ordering: drain<br>Aug 8 16:08:09 Condor kernel: [2261509.078676] block drbd4: Backing device's merge_bvec_fn() = ffffffff81439bc0<br>Aug 8 16:08:09 Condor kernel: [2261509.078679] block drbd4: max_segment_size ( = BIO size ) = 4096<br>Aug 8 16:08:09 Condor kernel: [2261509.078683] block drbd4: drbd_bm_resize called with capacity == 65456<br>Aug 8 16:08:09 Condor kernel: [2261509.078689] block drbd4: resync bitmap: bits=8182 words=128<br>Aug 8 16:08:09 Condor kernel: [2261509.078692] block drbd4: size = 32 MB (32728 KB)<br>Aug 8 16:08:09 Condor kernel: [2261509.078743] block drbd4: recounting of set bits took additional 0 jiffies<br>Aug 8 16:08:09 Condor kernel: [2261509.078746] block drbd4: 0 KB (0 bits) marked out-of-sync by on disk bit-map.<br>Aug 8 16:08:09 Condor kernel: [2261509.078750] block drbd4: disk( Attaching -> Outdated )<br>Aug 8 16:08:09 Condor kernel: [2261509.093225] block drbd4: conn( StandAlone -> Unconnected )<br>Aug 8 16:08:09 Condor kernel: [2261509.093246] block drbd4: Starting receiver thread (from drbd4_worker [23998])<br>Aug 8 16:08:09 Condor kernel: [2261509.093303] block drbd4: receiver (re)started<br>Aug 8 16:08:09 Condor kernel: [2261509.093308] block drbd4: conn( Unconnected -> WFConnection )<br>Aug 8 16:08:09 Condor kernel: [2261509.188172] block drbd4: Handshake successful: Agreed network protocol version 91<br>Aug 8 16:08:09 Condor kernel: [2261509.188179] block drbd4: conn( WFConnection -> WFReportParams )<br>Aug 8 16:08:09 Condor kernel: [2261509.188318] block drbd4: Starting asender thread (from drbd4_receiver [24045])<br>Aug 8 16:08:09 Condor kernel: [2261509.188392] block drbd4: data-integrity-alg: <not-used><br>Aug 8 16:08:09 Condor kernel: [2261509.188921] block drbd4: drbd_sync_handshake:<br>Aug 8 16:08:09 Condor kernel: [2261509.188926] block drbd4: self 142A4F0F4025D354:0000000000000000:6D30156DB75DBAB4:7F22ED3EC52A5F1C bits:0 flags:0<br>Aug 8 16:08:09 Condor kernel: [2261509.188930] block drbd4: peer 94813C0B3B6F6EB1:142A4F0F4025D355:6D30156DB75DBAB5:7F22ED3EC52A5F1C bits:0 flags:0<br>Aug 8 16:08:09 Condor kernel: [2261509.188934] block drbd4: uuid_compare()=-1 by rule 50<br>Aug 8 16:08:09 Condor kernel: [2261509.188943] block drbd4: peer( Unknown -> Primary ) conn( WFReportParams -> WFBitMapT ) pdsk( DUnknown -> UpToDate )<br>Aug 8 16:08:09 Condor kernel: [2261509.207454] block drbd4: conn( WFBitMapT -> WFSyncUUID )<br>Aug 8 16:08:09 Condor kernel: [2261509.208080] block drbd4: helper command: /sbin/drbdadm before-resync-target minor-4<br>Aug 8 16:08:09 Condor snapshot-resync-target-lvm.sh[24161]: invoked for bind<br>Aug 8 16:08:09 Condor snapshot-resync-target-lvm.sh[24161]: File descriptor 3 (/) leaked on lvdisplay invocation. Parent PID 24161: /bin/bash<br>Aug 8 16:08:09 Condor snapshot-resync-target-lvm.sh[24161]: File descriptor 4 (/etc) leaked on lvdisplay invocation. Parent PID 24161: /bin/bash<br>Aug 8 16:08:09 Condor snapshot-resync-target-lvm.sh[24161]: File descriptor 6 (/etc) leaked on lvdisplay invocation. Parent PID 24161: /bin/bash<br>Aug 8 16:08:09 Condor snapshot-resync-target-lvm.sh[24161]: File descriptor 7 (/etc) leaked on lvdisplay invocation. Parent PID 24161: /bin/bash<br>Aug 8 16:08:09 Condor snapshot-resync-target-lvm.sh[24161]: File descriptor 8 (/etc) leaked on lvdisplay invocation. Parent PID 24161: /bin/bash<br>Aug 8 16:08:09 Condor snapshot-resync-target-lvm.sh[24161]: File descriptor 9 (/etc) leaked on lvdisplay invocation. Parent PID 24161: /bin/bash<br>Aug 8 16:08:09 Condor snapshot-resync-target-lvm.sh[24161]: File descriptor 10 (/etc) leaked on lvdisplay invocation. Parent PID 24161: /bin/bash<br>Aug 8 16:08:09 Condor snapshot-resync-target-lvm.sh[24161]: File descriptor 3 (/) leaked on lvcreate invocation. Parent PID 24231: /bin/bash<br>Aug 8 16:08:09 Condor snapshot-resync-target-lvm.sh[24161]: File descriptor 4 (/etc) leaked on lvcreate invocation. Parent PID 24231: /bin/bash<br>Aug 8 16:08:09 Condor snapshot-resync-target-lvm.sh[24161]: File descriptor 6 (/etc) leaked on lvcreate invocation. Parent PID 24231: /bin/bash<br>Aug 8 16:08:09 Condor snapshot-resync-target-lvm.sh[24161]: File descriptor 7 (/etc) leaked on lvcreate invocation. Parent PID 24231: /bin/bash<br>Aug 8 16:08:09 Condor snapshot-resync-target-lvm.sh[24161]: File descriptor 8 (/etc) leaked on lvcreate invocation. Parent PID 24231: /bin/bash<br>Aug 8 16:08:09 Condor snapshot-resync-target-lvm.sh[24161]: File descriptor 9 (/etc) leaked on lvcreate invocation. Parent PID 24231: /bin/bash<br>Aug 8 16:08:09 Condor snapshot-resync-target-lvm.sh[24161]: File descriptor 10 (/etc) leaked on lvcreate invocation. Parent PID 24231: /bin/bash<br>Aug 8 16:08:09 Condor snapshot-resync-target-lvm.sh[24161]: Rounding up size to full physical extent 16.00 MiB<br>Aug 8 16:08:09 Condor snapshot-resync-target-lvm.sh[24161]: Logical volume "bind-before-resync" created<br>Aug 8 16:08:09 Condor kernel: [2261509.340447] block drbd4: helper command: /sbin/drbdadm before-resync-target minor-4 exit code 0 (0x0)<br>Aug 8 16:08:09 Condor kernel: [2261509.340452] block drbd4: conn( WFSyncUUID -> SyncTarget ) disk( Outdated -> Inconsistent )<br>Aug 8 16:08:09 Condor kernel: [2261509.340459] block drbd4: Began resync as SyncTarget (will sync 0 KB [0 bits set]).<br>Aug 8 16:08:10 Condor crm-unfence-peer.sh[24552]: invoked for bind<br>Aug 8 16:08:10 Condor kernel: [2261509.878140] block drbd4: Resync done (total 1 sec; paused 0 sec; 0 K/sec)<br>Aug 8 16:08:10 Condor kernel: [2261509.878149] block drbd4: conn( SyncTarget -> Connected ) disk( Inconsistent -> UpToDate )<br>Aug 8 16:08:10 Condor kernel: [2261509.878158] block drbd4: helper command: /sbin/drbdadm after-resync-target minor-4<br>Aug 8 16:08:10 Condor kernel: [2261509.942702] block drbd4: helper command: /sbin/drbdadm after-resync-target minor-4 exit code 0 (0x0)<br><br>I would expect something like this to be logged after the after-resync-target is issued:<br><br></span><span id="b9552886-d25b-4636-9a83-7d42d9dc8f7d">Aug 8 xx:xx:xx Condor unsnapshot-resync-target-lvm.sh[xxxxxxx]: Logical volume "bind-before-resync" removed</span><br><span id="b9552886-d25b-4636-9a83-7d42d9dc8f7d"><br>Thanks!<br><br><span name="x"></span><p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Jake Smith</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Network Admin</span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Argotec, Inc.</span></p>
</span></div></body></html>