[DRBD-user] Initial setup hangs my machine

Ben bench at silentmedia.com
Sun Feb 5 18:59:35 CET 2006

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


Hey guys. I'm trying to set up DRBD, and as far as I can tell I've  
set things up correctly. But I must be missing something, because  
when I try to make a filesystem on my drbd devices, the process hangs  
and I have to go press the reset switch. Not exactly desired  
behavior......


I have two machines, johnny and cash. At the moment, I am testing  
with two drbd devices, "web" and "mail". I would like johnny to be  
primary for drbd0 (mail) and secondary for drbd1 (web), and vice  
versa for cash. "web" and "mail" on both machines are on top of  
logical LVM2 volumes, and the meta-disk for each resource is on its  
own 128MB logical LVM2 volume.

I have faith that I my config is at least mostly correct, because  
after I brought up both resources initially, they synced up just fine:

[root at johnny ~]# cat /proc/drbd
version: 0.7.15 (api:77/proto:74)
SVN Revision: 2020 build by root at johnny, 2006-02-04 10:02:27
0: cs:Connected st:Secondary/Secondary ld:Consistent
     ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
1: cs:Connected st:Secondary/Secondary ld:Consistent
     ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0

[root at cash ~]# cat /proc/drbd
version: 0.7.15 (api:77/proto:74)
SVN Revision: 2020 build by root at cash, 2006-02-04 10:04:55
0: cs:Connected st:Secondary/Secondary ld:Consistent
     ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
1: cs:Connected st:Secondary/Secondary ld:Consistent
     ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0

So then I make my resources primary on the right machines....

[root at johnny ~]# drbdadm -- --do-what-I-say primary mail
[root at cash ~]# drbdadm -- --do-what-I-say primary web

This seems to go well:

[root at johnny ~]# cat /proc/drbd
version: 0.7.15 (api:77/proto:74)
SVN Revision: 2020 build by root at johnny, 2006-02-04 10:02:27
0: cs:Connected st:Primary/Secondary ld:Consistent
     ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
1: cs:Connected st:Secondary/Primary ld:Consistent
     ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0

[root at cash ~]# cat /proc/drbd
version: 0.7.15 (api:77/proto:74)
SVN Revision: 2020 build by root at cash, 2006-02-04 10:04:55
0: cs:Connected st:Secondary/Primary ld:Consistent
     ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
1: cs:Connected st:Primary/Secondary ld:Consistent
     ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0

And here's where the badness starts. As I understand things, I should  
now be able to treat /dev/drbd0 on johnny as if it was a local disk,  
and also /dev/drbd1 on cash. But if I try to make a filesystem,  
mke2fs hangs after writing inode tables and before writing  
superblocks. No disk activity, no network activity, and no ability to  
stop drbd (and hence mke2fs) short of the reset switch.

Just to rule out LVM2, I was able to successfully create a new  
logical LVM2 volume and format it via mke2fs without issue. So AFAICT  
the problem seems to be with DRBD. Unfortunately I don't see anything  
showing up in /var/log/messages after the switches to primary.

Any thoughts or debugging suggestions?



More information about the drbd-user mailing list