[Drbd-dev] DRBD-8: Patch to fix incorrect split-brain occurrence.

Graham, Simon Simon.Graham at stratus.com
Tue Dec 19 16:45:04 CET 2006


In testing, we have run into a case where we unexpectedly get a
split-brain situation - after some investigation I think I have found
the reason - at the end of syncing, the SyncTarget side finishes up by
setting it's UUID info to the same as the Source (in
drbd_resync_finished) - the code that does this checks for connection
state SyncTarget before doing this. 

Now, I have seen that sometimes the resync completes when in PausedSyncT
state - for example, if the last set of blocks is already under way when
we decide to go into the PausedSyncT state - thus it's entirely possible
to enter drbd_resync_finished with connection state PausedSyncT in which
case we do finish up the resync but do not copy the UUID info - this
means that the next time we need to resync, the code determines that we
have a split-brain situation.

In other places in the code, checks are made for either SyncTarget or
PausedSyncT so I propose fixing this (patch attached) the same way -
have drbd_resync_finished check for either SyncTarget OR PausedSyncT.

Simon

-------------- next part --------------
A non-text attachment was scrubbed...
Name: drbd-resync.patch
Type: application/octet-stream
Size: 755 bytes
Desc: drbd-resync.patch
Url : http://lists.linbit.com/pipermail/drbd-dev/attachments/20061219/80d75093/drbd-resync.obj


More information about the drbd-dev mailing list