[DRBD-user] degr-wfc-timeout and on-disk MDF_PrimaryInd

Lars Ellenberg lars.ellenberg at linbit.com
Wed Feb 18 09:57:03 CET 2009

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


On Tue, Feb 17, 2009 at 08:05:40PM +0100, Matthias Ferdinand wrote:
> Hello,
> 
> using Ubuntu 8.04 LTS i386 (kernel 2.6.24-23-server, drbd 8.0.11).
> 
> When drbd starts and the peer is unreachable, the init scripts will apply
> one of the wfc-timeouts:
>    degr-wfc-timeout:    if we recover from a crash when we were 
>                           a degraded Primary (i.e. not connected)
>    wfc-timeout:         else
> 
> According to
>   http://lists.linbit.com/pipermail/drbd-user/2007-September/007457.html
> it should use wfc-timeout on a clean reboot.
> 
> When I power-cycle an unconnected Primary, it uses degr-wfc-timeout on
> reboot - fine. 
> When I do a clean reboot after that (still unconnected), it keeps using
> degr-wfc-timeout at reboot. 
> 
> Shouldn't that be wfc-timeout instead?

Yes.

> Looking with "drbdadm dump-md", it seems that the MDF_PrimaryInd Flag
> (0x00000002) is never cleared on disk.


hm.
that probably is because the CRASHED_PRIMARY (in memory only) flag
is not cleared when becoming Primary again.

We will discuss this.

> Mit freundlichen Grüßen / Regards
>   Matthias Ferdinand

Thanks for the report.

> -------------- cut ------------------------------------------------
> 
> root at m1-cl0:~# drbdadm create-md r0
> v08 Magic number not found
> v07 Magic number not found
> v07 Magic number not found
> v08 Magic number not found
> Writing meta data...
> initialising activity log
> NOT initialized bitmap
> New drbd meta data block sucessfully created.
> 
> root at m1-cl0:~# drbdadm dump-md r0 | grep flags
>     flags 0x00000000;
> 
> root at m1-cl0:~# modprobe drbd
> 
> root at m1-cl0:~# drbdadm up r0
> 
> root at m1-cl0:~# drbdadm -- --overwrite-data-of-peer primary r0
> 
> root at m1-cl0:~# cat /proc/drbd
> version: 8.0.11 (api:86/proto:86)
> GIT-hash: b3fe2bdfd3b9f7c2f923186883eb9e2a0d3a5b1b build by phil at mescal,
> 2008-02-12 11:56:43
>  0: cs:WFConnection st:Primary/Unknown ds:UpToDate/Outdated C r---
>     ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
>         resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0
>         act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0 changed:0
> 
> root at m1-cl0:~# drbdadm down r0
> 
> root at m1-cl0:~# drbdadm dump-md r0 | grep flags
>     flags 0x00000031;
> 
> root at m1-cl0:~# drbdadm up r0
> 
> root at m1-cl0:~# drbdadm primary r0
> 
> root at m1-cl0:~# dd if=/dev/zero of=/dev/drbd0 bs=1k count=1
> 1+0 records in
> 1+0 records out
> 1024 bytes (1.0 kB) copied, 0.000571521 s, 1.8 MB/s
> 
> root at m1-cl0:~# cat /proc/drbd
> version: 8.0.11 (api:86/proto:86)
> GIT-hash: b3fe2bdfd3b9f7c2f923186883eb9e2a0d3a5b1b build by phil at mescal,
> 2008-02-12 11:56:43
>  0: cs:WFConnection st:Primary/Unknown ds:UpToDate/Outdated C r---
>     ns:0 nr:0 dw:4 dr:4 al:1 bm:0 lo:0 pe:0 ua:0 ap:0
>         resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0
>         act_log: used:0/257 hits:0 misses:1 starving:0 dirty:0 changed:1
> 
> # power-cycle ...
> 
> root at m1-cl0:~# drbdadm dump-md r0 | grep flags
>     flags 0x00000033;
> 
> root at m1-cl0:~# modprobe drbd
> 
> root at m1-cl0:~# drbdadm up r0
> 
> root at m1-cl0:~# cat /proc/drbd
> version: 8.0.11 (api:86/proto:86)
> GIT-hash: b3fe2bdfd3b9f7c2f923186883eb9e2a0d3a5b1b build by phil at mescal,
> 2008-02-12 11:56:43
>  0: cs:WFConnection st:Secondary/Unknown ds:UpToDate/Outdated C r---
>     ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
>         resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0
>         act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0 changed:0
> 
> root at m1-cl0:~# drbdadm primary r0
> 
> root at m1-cl0:~# cat /proc/drbd
> version: 8.0.11 (api:86/proto:86)
> GIT-hash: b3fe2bdfd3b9f7c2f923186883eb9e2a0d3a5b1b build by phil at mescal,
> 2008-02-12 11:56:43
>  0: cs:WFConnection st:Primary/Unknown ds:UpToDate/Outdated C r---
>     ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
>         resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0
>         act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0 changed:0
> 
> root at m1-cl0:~# drbdadm secondary r0
> 
> root at m1-cl0:~# drbdadm down r0
> 
> root at m1-cl0:~# rmmod drbd
> 
> root at m1-cl0:~# drbdadm dump-md r0 | grep flags
>     flags 0x00000033;
> 
> -------------- cut ------------------------------------------------
> -- 
> one4vision GmbH                    Fon +49 681 96727 - 60
> Residenz am Schlossgarten          Fax +49 681 96727 - 69
> Talstraße 34-42                    info at one4vision.de
> D-66119 Saarbrücken                http://www.one4vision.de
> HRB 11751                          verantwortl. Geschäftsführer:
> Amtsgericht Saarbrücken            Christof Allmann, Christoph Harth
> 
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
__
please don't Cc me, but send to list   --   I'm subscribed



More information about the drbd-user mailing list