[DRBD-user] Is it possible to create diskless peer?

trekker.dk at abclinuxu.cz trekker.dk at abclinuxu.cz
Thu Jan 6 13:38:52 CET 2011

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hello.

I'm in this situation: Host A has a DRBD resource (primary, StandAlone) 
and I want to create a diskless peer for it in dual-primary setup on 
host B. So I do the following:

A: /sbin/drbdsetup 10 net 192.168.1.191:19010 192.168.1.192:18999 C -m 
--create-device
B: /sbin/drbdsetup 10 net 192.168.1.192:19010 192.168.1.191:19010 C -m 
--create-device

After that I need to wait kinda long time (about 20 seconds) for DRBDs 
to switch from WFConnection to Connected on both sides. When that's 
done, I issue

B: /sbin/drbdsetup 10 primary

After that point connection immediately breaks, dmesg on A shows

[ 3749.553918] block drbd10: peer( Secondary -> Primary )
[ 3749.627518] block drbd10: drivers/block/drbd/drbd_receiver.c:1943: 
sector: 4513408s, size: 4096
[ 3749.676599] block drbd10: error receiving DataRequest, l: 24!
[ 3749.724833] block drbd10: peer( Primary -> Unknown ) conn( Connected 
-> ProtocolError ) pdsk( Diskless -> DUnknown )
[ 3749.774481] block drbd10: asender terminated
[ 3749.822527] block drbd10: Terminating drbd10_asender
[ 3749.822661] block drbd10: Connection closed
[ 3749.822666] block drbd10: conn( ProtocolError -> Unconnected )

The network connection is automatically re-established (that takes about 
20 seconds again), but during that time the diskless peer on B is 
already primary, but unusable (no access to any storage) and dmesg on B 
gets flooded by error messages.

I'm currently working around that by checking state from /proc/drbd, but 
I'd like to know if this behavior is a bug or not.

Both hosts run kernel 2.6.37 (same behavior on 2.6.36 at least), backing 
storage on A is a LVM partition.

Answers to some questions you might ask:

Bad network connection - don't think so, when I create peer with disk, 
connection is established almost immediately and doesn't break when B 
transitions from secondary to primary.

Why create diskless storage - temporary storage for a virtual guest for 
migration (when host gets overloaded and there's need to move some 
guests elsewhere for a while without causing additional I/O for sync)

Thanks for answers.
JB



More information about the drbd-user mailing list