Check DRBD sync status

To check the current DRBD synchronization status, type the following command:

# cat /proc/drbd

Sample output master node

version: 8.3.16 (api:88/proto:86-97)
GIT-hash: a798fa7e274428a357657fb52f0ecf40192c1985 build by phil@Build64R6, 2013-09-27 16:00:43

 1: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----
    ns:265832 nr:0 dw:263360 dr:108049 al:54 bm:14 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0

Sample output slave node

version: 8.3.16 (api:88/proto:86-97)
GIT-hash: a798fa7e274428a357657fb52f0ecf40192c1985 build by phil@Build64R6, 2013-09-27 16:00:43

 1: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r-----
    ns:0 nr:265832 dw:265832 dr:0 al:0 bm:12 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0

These examples show a correctly working sync. Both nodes show „cs:Connected“. This indicates all nodes are connected and replicating. Also, it is running as primary node „ro:Primary/Secondary“ and the sync is up to date („ds:UpToDate / UpToDate“). The second node is running as secondary and is also connected.

Should any node show „cs:StandAlone“, then the synchronization has stopped. This could have been caused by a split-brain occurrence or any communication error. To resolve this, you need to choose which node is the current one and force a re-sync from the other node. You can type the following commands on the secondary node (make sure) to achieve this:

# drbdadm detach sb4 
# drbdadm attach sb4 
# drbdadm invalidate sb4 
# drbdadm syncer sb4            [* this command might not be available ]
# drbdadm connect sb4

After entering the commands, you can follow the sync process with „cat /proc/drbd“. The process should take around 7 minutes, depending on the amount of data.

Log file

The Corosync log can be found in:

/var/log/corosync.log

This log file contains info about the HA stack.

Last modified: Aug 19, 2020

Need more help with this?
Visit the Projective Support Websites

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.