1

WinDRBD's progress is only visible when syncing. But I'd like to know how far has gone if the out-of-sync remains.

drbdsetup status foo --v --s 

Through the detail view command, the following contents were obtained.

foo node-id:2 role:Primary suspended:no
    write-ordering:flush
  volume:1 minor:1 disk:UpToDate backing_dev:\DosDevices\G: quorum:yes
      size:524253532 read:7238338 written:5209825 al-writes:589 bm-writes:198 upper-pending:0 lower-pending:10
      al-suspended:no blocked:no
  Node1 node-id:1 connection:Connected role:Secondary congested:no ap-in-flight:0 rs-in-flight:7168
    volume:1 replication:SyncSource peer-disk:Inconsistent done:85.32 resync-suspended:no
        received:0 sent:1226764 out-of-sync:210484 pending:6 unacked:10 dbdt1:14.99 eta:14

done:85.32

This part is known as the progress rate.

How was this calculated?

inding
  • 15
  • 3

1 Answers1

1

When a resource becomes disconnected, the out-of-sync counter will begin to increment on the peer that is currently Primary. When the resource reconnects, the bitmaps (stored in DRBD's metadata) are compared to determine which blocks became out-of-sync while disconnected, and proceeds to resync those blocks in the background. Any writes that occur during a background resync are immediately replicated, and if that write happens to touch a block that's a part of the background resync, it's removed from the resync queue (since it was updated by the foreground replication).

Matt Kereczman
  • 477
  • 4
  • 9
  • Thank you! it was helpful! If you know one more thing, is there any way I can do the math to get the progress number? This is because I want to know the progress rate even when the synchronization is stopped. – inding Sep 14 '21 at 04:15
  • because the sync rate is variable/dynamic, you cannot really know for sure, but you can get close by dividing the number of `out-of-sync` blocks (which is displayed in `KiB`) by your expected resync rate. – Matt Kereczman Sep 15 '21 at 15:50
  • Matt Thanks for your kind reply. I thought that I should be able to use the ```done``` information in the detailed information. – inding Sep 17 '21 at 01:02