I have run drbdadm verify on a resource. This is for a resource which is currently primary on virtual6, secondary on virtual1 and virtual5; I ran drdmadm verify on virtual5.
The console on virtual5 logs that it’s finding lots of differences, e.g.
While the verify is running:
root@virtual5:/home/brian# drbdadm status pm-eb40ca57
pm-eb40ca57 role:Secondary
disk:UpToDate open:no
virtual1 role:Secondary
replication:VerifyT peer-disk:UpToDate done:94.44
virtual6 role:Primary
peer-disk:UpToDate
root@virtual5:/home/brian# drbdadm status pm-eb40ca57 --statistics
pm-eb40ca57 role:Secondary
disk:UpToDate open:no
read:198159692 written:925764
virtual1 role:Secondary
replication:VerifyT peer-disk:UpToDate done:94.57
received:0 sent:0 out-of-sync:3428248
virtual6 role:Primary
peer-disk:UpToDate
received:614720 sent:0
After it has completed:
root@virtual5:/home/brian# drbdadm status pm-eb40ca57
pm-eb40ca57 role:Secondary
disk:UpToDate open:no
virtual1 role:Secondary
peer-disk:UpToDate
virtual6 role:Primary
peer-disk:UpToDate
root@virtual5:/home/brian# drbdadm status pm-eb40ca57 --statistics
pm-eb40ca57 role:Secondary
disk:UpToDate open:no
read:209727184 written:925764
virtual1 role:Secondary
peer-disk:UpToDate
received:0 sent:0 out-of-sync:4038396
virtual6 role:Primary
peer-disk:UpToDate
received:614720 sent:0
This seems to be telling me that it’s virtual1 that’s out of date with respect to the primary, and virtual5 is fine?
I note that the drbdadm manpage says “See drbdsetup(8) for details”, and there it says:
Online verification compares each disk block on the local and peer node. Blocks which differ between the nodes are marked as out-of-sync, but they are **not** automatically brought back into sync. To bring them into sync, the drbdsetup invalidate or drbdsetup invalidate-remote with the --reset-bitmap=no option can be used. Progress can be monitored in the output of drbdsetup status --statistics.
OK, so I ran this on virtual5 (one of the secondaries, the one which I thought was clean):
root@virtual5:/home/brian# drbdadm invalidate pm-eb40ca57 --reset-bitmap=no
root@virtual5:/home/brian# drbdadm status pm-eb40ca57 --statistics
pm-eb40ca57 role:Secondary
disk:Inconsistent open:no
read:209727824 written:1491300
virtual1 role:Secondary
replication:SyncTarget peer-disk:UpToDate done:14.00
received:557432 sent:0 out-of-sync:3472860
virtual6 role:Primary
peer-disk:UpToDate resync-suspended:dependency
received:614720 sent:0 out-of-sync:565536
root@virtual5:/home/brian# drbdadm status pm-eb40ca57 --statistics
pm-eb40ca57 role:Secondary
disk:Inconsistent open:no
read:209727952 written:2502708
virtual1 role:Secondary
replication:SyncTarget peer-disk:UpToDate done:39.05
received:1549248 sent:0 out-of-sync:2461452
virtual6 role:Primary
peer-disk:UpToDate resync-suspended:dependency
received:614720 sent:0 out-of-sync:1576944
root@virtual5:/home/brian# drbdadm status pm-eb40ca57 --statistics
pm-eb40ca57 role:Secondary
disk:UpToDate open:no
read:209727952 written:4964160
virtual1 role:Secondary
peer-disk:UpToDate
received:3786212 sent:0
virtual6 role:Primary
peer-disk:UpToDate
received:614720 sent:0 out-of-sync:4038396
Then on virtual1 (the other secondary, the one which appeared to be dirty):
brian@virtual1:~$ sudo drbdadm invalidate pm-eb40ca57 --reset-bitmap=no
brian@virtual1:~$ sudo drbdadm status pm-eb40ca57
pm-eb40ca57 role:Secondary
disk:UpToDate open:no
virtual5 role:Secondary
peer-disk:UpToDate
virtual6 role:Primary
peer-disk:UpToDate
brian@virtual1:~$ sudo drbdadm status pm-eb40ca57 --statistics
pm-eb40ca57 role:Secondary
disk:UpToDate open:no
read:670462960 written:100526454
virtual5 role:Secondary
peer-disk:UpToDate
received:0 sent:3786212
virtual6 role:Primary
peer-disk:UpToDate
received:0 sent:0 out-of-sync:4038460
brian@virtual1:~$ sudo drbdadm status pm-eb40ca57 --statistics
pm-eb40ca57 role:Secondary
disk:UpToDate open:no
read:670465520 written:100526454
virtual5 role:Secondary
peer-disk:UpToDate
received:0 sent:3786212
virtual6 role:Primary
peer-disk:UpToDate
received:0 sent:0 out-of-sync:4038460
And aftewards, checking on virtual6 (the primary):
brian@virtual6:~$ sudo drbdadm status pm-eb40ca57 --statistics
pm-eb40ca57 role:Primary
disk:UpToDate open:yes
read:634683166 written:127129949
virtual1 role:Secondary
peer-disk:UpToDate
received:0 sent:0 out-of-sync:4038460
virtual5 role:Secondary
peer-disk:UpToDate
received:0 sent:614720
The primary is still showing “out-of-sync” counter against virtual1. Does this just reflect the count of blocks which were out of sync during the verify scan, and is not reset after syncing?
So then I ran a new verify on virtual1:
brian@virtual1:~$ sudo drbdadm verify pm-eb40ca57
brian@virtual1:~$ sudo drbdadm status pm-eb40ca57 --statistics
pm-eb40ca57 role:Secondary
disk:UpToDate open:no
read:674744888 written:100526454
virtual5 role:Secondary
replication:VerifyS peer-disk:UpToDate done:1.02
received:0 sent:3786212
virtual6 role:Primary
replication:VerifyS peer-disk:UpToDate done:1.02
received:0 sent:0 out-of-sync:4038460
and I see the “out-of-sync” counter remains as it was: it has not dropped down to zero. I am seeing new sync mismatches being logged though:
brian@virtual1:~$ sudo dmesg | tail; cat /proc/uptime
[31624775.236683] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=2441936, size=8 (sectors)
[31624775.236854] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=2441992, size=8 (sectors)
[31624775.236995] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=2442032, size=8 (sectors)
[31624775.237245] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=2442368, size=8 (sectors)
[31624775.237458] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=2442592, size=8 (sectors)
[31624775.237768] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=2443096, size=8 (sectors)
[31624775.248231] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=2444664, size=8 (sectors)
[31624775.283477] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=2445272, size=8 (sectors)
[31624775.283751] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=2445504, size=8 (sectors)
[31624784.033131] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=4214224, size=184 (sectors)
31624354.44 1486186569.66
(a bit later)
brian@virtual1:~$ sudo dmesg | tail; cat /proc/uptime
[31625190.437858] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=85999072, size=24 (sectors)
[31625190.437994] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=85999104, size=16 (sectors)
[31625190.438126] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=85999168, size=40 (sectors)
[31625190.438217] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=85999216, size=16 (sectors)
[31625190.438329] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=85999240, size=40 (sectors)
[31625190.438449] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=85999296, size=56 (sectors)
[31625190.438548] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=85999384, size=8 (sectors)
[31625190.438640] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=85999408, size=8 (sectors)
[31625190.438826] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=85999584, size=8 (sectors)
[31625190.438916] drbd pm-eb40ca57/0 drbd1009 virtual6: Out of sync: start=85999600, size=16 (sectors)
31624692.77 1486202306.11
But the “out-of-sync” stats counter is still not incrementing:
brian@virtual1:~$ sudo drbdadm status pm-eb40ca57 --statistics
pm-eb40ca57 role:Secondary
disk:UpToDate open:no
read:710311084 written:100526454
virtual5 role:Secondary
replication:VerifyS peer-disk:UpToDate done:9.51
received:0 sent:3786212
virtual6 role:Primary
replication:VerifyS peer-disk:UpToDate done:9.49
received:0 sent:0 out-of-sync:4038460
(a bit later)
brian@virtual1:~$ sudo drbdadm status pm-eb40ca57 --statistics
pm-eb40ca57 role:Secondary
disk:UpToDate open:no
read:769474256 written:100526454
virtual5 role:Secondary
replication:VerifyS peer-disk:UpToDate done:23.61
received:0 sent:3786212
virtual6 role:Primary
replication:VerifyS peer-disk:UpToDate done:23.60
received:0 sent:0 out-of-sync:4038460
This is now confusing me. Are these replicas in sync, or not? And if not, how do I bring them into sync?
Note: as I’m mid-migration, drbd versions are mismatched. virtual5 has drbd 9.3.4, while the other two nodes have 9.2.15
