Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
* [Drbd-dev] Primary/Diskless node cannot reconnect
@ 2009-11-01 22:25 Graham, Simon
  2009-11-02 22:42 ` Lars Ellenberg
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Graham, Simon @ 2009-11-01 22:25 UTC (permalink / raw)
  To: drbd-dev

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

If you are in a situation where one node is Primary/Diskless and the
other Secondary/UpToDate, DRDB works just fine, redirecting the I/O to
the secondary node. However, if you then lose the network connection for
any reasons (say some sort of transient issue), DRBD will not allow the
connection to be re-established even though nothing has actually
changed.

When the connect request comes in, you see this trace message:

       Can only connect to data with current UUID=XXXXX

Which is output by receive_uuids in drbd_receiver.c. I understand why
this check should be made _if_ you actually have a local disk on the
Primary, but if you are Diskless I think it is not necessary and results
in unnecessary problems. My proposed fix is to add an explicit test for
Diskless in the if statement so that it only does the check for current
UUID if the disk state is > Diskless.

Proposed patch attached against 8.2.
Simon

[-- Attachment #2: primary-diskless-connect.patch --]
[-- Type: application/octet-stream, Size: 485 bytes --]

diff --git a/drbd/drbd_receiver.c b/drbd/drbd_receiver.c
index e5e4769..5fdeb87 100644
--- a/drbd/drbd_receiver.c
+++ b/drbd/drbd_receiver.c
@@ -2459,6 +2459,7 @@ STATIC int receive_uuids(struct drbd_conf *mdev, struct Drbd_Header *h)
 	mdev->p_uuid = p_uuid;
 
 	if (mdev->state.conn < Connected &&
+	    mdev->state.disk > Diskless &&
 	    mdev->state.disk <= Negotiating &&
 	    mdev->state.role == Primary &&
 	    (mdev->ed_uuid & ~((u64)1)) != (p_uuid[Current] & ~((u64)1))) {

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-11-03 14:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-01 22:25 [Drbd-dev] Primary/Diskless node cannot reconnect Graham, Simon
2009-11-02 22:42 ` Lars Ellenberg
2009-11-03  3:47 ` Graham, Simon
2009-11-03 11:13   ` Lars Ellenberg
     [not found] ` <BC2F8964429F14468EA0E6D6CF00E8C9390DA7@EXHQ.corp.strat us.com>
2009-11-03 12:40   ` Graham, Simon
2009-11-03 14:09     ` Lars Ellenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox