[DRBD-user] how do I know if resources are out of sync?

Tomasz Chmielewski mangoo at wpkg.org
Wed Mar 19 15:47:34 CET 2008

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


I just made an online verification of a resource, which found some 
out-of-sync blocks:

(...)
drbd12: Out of sync: start=128000, size=128 (sectors)
drbd12: Out of sync: start=312800, size=160 (sectors)
drbd12: Online verify  done (total 16813 sec; paused 0 sec; 996 K/sec)
drbd12: Online verify found 3216 4k block out of sync!
drbd12: helper command: /sbin/drbdadm out-of-sync
drbd12: Writing the whole bitmap.
drbd12: writing of bitmap took 46 jiffies
drbd12: 12 MB (3216 bits) marked out-of-sync by on disk bit-map.
drbd12: conn( VerifyS -> Connected )


Which doesn't wonder, as earlier I made them corrupt in several places 
on the secondary with commands like:

dd if=/dev/urandom of=/dev/disk seek=2345 bs=64k count=100


As I would like to automate it via cron - how do I know if a resource is 
out of sync? Parsing syslog or dmesg doesn't seem to be the best way.

Does /proc/drbd give a hint that the resources are out of sync?

12: cs:Connected st:Primary/Secondary ds:UpToDate/UpToDate C r---
     ns:20755068 nr:0 dw:3963192 dr:122243800 al:7215 bm:1521 lo:0 pe:0 
ua:0 ap:0
         resync: used:0/31 hits:9458373 misses:3362 starving:0 dirty:0 
changed:3362
         act_log: used:0/127 hits:983583 misses:8894 starving:7 
dirty:1674 changed:7215


I didn't find anything in this output.

How to make sure, after verification was done, that the resource is out 
of sync?


-- 
Tomasz Chmielewski
http://wpkg.org



More information about the drbd-user mailing list