[DRBD-user] DRBD can`t be primary after boot

Proskurin Kirill proskurin-kv at fxclub.org
Fri Apr 2 16:53:01 CEST 2010

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


Hello

What we have:
Debian Lenny 2.6.26-2-amd64
drbd8-2.6.26-2-amd64 2:8.3.7-1~bpo50+1+2.6.26-21lenny4
drbd8-source         2:8.3.7-1~bpo50+1
drbd8-utils          2:8.3.7-1~bpo50+1
ocfs2-tools          1.4.1-1

DRBD not becoming primary after reboot but manual set(drdbadm) is work 
well.

Whats is wrong?

Here dmesg logs:
[   19.603692] drbd: initialized. Version: 8.3.7 (api:88/proto:86-91)
[   19.603692] drbd: GIT-hash: ea9e28dbff98e331a62bcbcc63a6135808fe2917 
build by root at buildd, 2010-01-23 08:21:00
[   19.603800] drbd: registered as block device major 147
[   19.603800] drbd: minor_table @ 0xffff81012dc658c0
[   19.609303] block drbd0: Starting worker thread (from cqueue [2522])
[   19.609303] block drbd0: disk( Diskless -> Attaching )
[   19.609307] block drbd0: Found 4 transactions (4 active extents) in 
activity log.
[   19.609307] block drbd0: Method to ensure write ordering: barrier
[   19.609307] block drbd0: max_segment_size ( = BIO size ) = 32768
[   19.609307] block drbd0: drbd_bm_resize called with capacity == 
1758501416
[   19.617318] block drbd0: resync bitmap: bits=219812677 words=3434574
[   19.617398] block drbd0: size = 839 GB (879250708 KB)
[   19.928251] block drbd0: recounting of set bits took additional 4 jiffies
[   19.928326] block drbd0: 0 KB (0 bits) marked out-of-sync by on disk 
bit-map.
[   19.928400] block drbd0: disk( Attaching -> Outdated )
[   20.014106] block drbd0: conn( StandAlone -> Unconnected )
[   20.014106] block drbd0: Starting receiver thread (from drbd0_worker 
[2531])
[   20.014106] block drbd0: receiver (re)started
[   20.014106] block drbd0: conn( Unconnected -> WFConnection )
[   20.114053] tg3: eth0: Link is up at 100 Mbps, full duplex.
[   20.114053] tg3: eth0: Flow control is off for TX and off for RX.
[   20.114053] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   20.835352] tg3: eth1: Link is up at 1000 Mbps, full duplex.
[   20.835352] tg3: eth1: Flow control is on for TX and on for RX.
[   20.835352] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   31.814454] block drbd0: State change failed: Refusing to be Primary 
without at least one UpToDate disk
[   31.814454] block drbd0:   state = { cs:WFConnection 
ro:Secondary/Unknown ds:Outdated/DUnknown r--- }
[   31.814454] block drbd0:  wanted = { cs:WFConnection 
ro:Primary/Unknown ds:Outdated/DUnknown s--- }
[   31.928454] eth0: no IPv6 routers present
[   32.991977] block drbd0: State change failed: Refusing to be Primary 
without at least one UpToDate disk
[   32.991977] block drbd0:   state = { cs:WFConnection 
ro:Secondary/Unknown ds:Outdated/DUnknown r--- }
[   32.991977] block drbd0:  wanted = { cs:WFConnection 
ro:Primary/Unknown ds:Outdated/DUnknown s--- }
[   33.716421] eth1: no IPv6 routers present
[   34.296836] block drbd0: State change failed: Refusing to be Primary 
without at least one UpToDate disk
[   34.296836] block drbd0:   state = { cs:WFConnection 
ro:Secondary/Unknown ds:Outdated/DUnknown r--- }
[   34.296836] block drbd0:  wanted = { cs:WFConnection 
ro:Primary/Unknown ds:Outdated/DUnknown s--- }
[   35.300779] block drbd0: State change failed: Refusing to be Primary 
without at least one UpToDate disk
[   35.300779] block drbd0:   state = { cs:WFConnection 
ro:Secondary/Unknown ds:Outdated/DUnknown r--- }
[   35.300779] block drbd0:  wanted = { cs:WFConnection 
ro:Primary/Unknown ds:Outdated/DUnknown s--- }
[   36.162995] block drbd0: State change failed: Refusing to be Primary 
without at least one UpToDate disk
[   36.162995] block drbd0:   state = { cs:WFConnection 
ro:Secondary/Unknown ds:Outdated/DUnknown r--- }
[   36.162995] block drbd0:  wanted = { cs:WFConnection 
ro:Primary/Unknown ds:Outdated/DUnknown s--- }
[   38.437540] block drbd0: State change failed: Refusing to be Primary 
without at least one UpToDate disk
[   38.437540] block drbd0:   state = { cs:WFConnection 
ro:Secondary/Unknown ds:Outdated/DUnknown r--- }
[   38.437541] block drbd0:  wanted = { cs:WFConnection 
ro:Primary/Unknown ds:Outdated/DUnknown s--- }
[   38.500007] ip_tables: (C) 2000-2006 Netfilter Core Team
[   56.015814] block drbd0: Handshake successful: Agreed network 
protocol version 91
[   56.015814] block drbd0: Peer authenticated using 20 bytes of 'sha1' HMAC
[   56.015814] block drbd0: conn( WFConnection -> WFReportParams )
[   56.015814] block drbd0: Starting asender thread (from drbd0_receiver 
[2586])
[   56.114490] block drbd0: data-integrity-alg: <not-used>
[   56.114572] block drbd0: drbd_sync_handshake:
[   56.114641] block drbd0: self 
F47E331A12755614:0000000000000000:4037D7F5E69C8286:A4CB5559EE20C5B1 
bits:0 flags:0
[   56.114733] block drbd0: peer 
651E640CABB22E01:F47E331A12755615:4037D7F5E69C8286:A4CB5559EE20C5B1 
bits:0 flags:0
[   56.114838] block drbd0: uuid_compare()=-1 by rule 50
[   56.114906] block drbd0: peer( Unknown -> Primary ) conn( 
WFReportParams -> WFBitMapT ) pdsk( DUnknown -> UpToDate )
[   56.841263] block drbd0: conn( WFBitMapT -> WFSyncUUID )
[   56.869211] block drbd0: helper command: /sbin/drbdadm 
before-resync-target minor-0
[   56.869211] block drbd0: helper command: /sbin/drbdadm 
before-resync-target minor-0 exit code 0 (0x0)
[   56.869211] block drbd0: conn( WFSyncUUID -> SyncTarget ) disk( 
Outdated -> Inconsistent )
[   56.869211] block drbd0: Began resync as SyncTarget (will sync 0 KB 
[0 bits set]).
[   59.229364] block drbd0: Resync done (total 2 sec; paused 0 sec; 0 K/sec)
[   59.229425] block drbd0: conn( SyncTarget -> Connected ) disk( 
Inconsistent -> UpToDate )
[   59.229425] block drbd0: helper command: /sbin/drbdadm 
after-resync-target minor-0
[   59.229425] block drbd0: helper command: /sbin/drbdadm 
after-resync-target minor-0 exit code 0 (0x0)




/etc/drbd.d/global_common.conf:

global {
         usage-count yes;
         # minor-count dialog-refresh disable-ip-verification
}

common {
         protocol C;

         handlers {
                 pri-on-incon-degr 
"/usr/lib/drbd/notify-pri-on-incon-degr.sh; 
/usr/lib/drbd/notify-emergency-reboot.sh; echo b > /proc/sysrq-trigger ; 
reboot -f";
                 pri-lost-after-sb 
"/usr/lib/drbd/notify-pri-lost-after-sb.sh; 
/usr/lib/drbd/notify-emergency-reboot.sh; echo b > /proc/sysrq-trigger ; 
reboot -f";
                 local-io-error "/usr/lib/drbd/notify-io-error.sh; 
/usr/lib/drbd/notify-emergency-shutdown.sh; echo o > /proc/sysrq-trigger 
; halt -f";
                 outdate-peer "/usr/lib/heartbeat/drbd-peer-outdater -t 5";
                 split-brain "/usr/lib/drbd/notify-split-brain.sh root";
         }

         startup {
                 wfc-timeout 10;
                 degr-wfc-timeout 120;
                 become-primary-on both;
         }

         disk {
                 fencing resource-and-stonith;
                 no-disk-flushes;
                 no-md-flushes;
         }

         net {
                 cram-hmac-alg sha1;
                 shared-secret "password";
                 allow-two-primaries;
                 ping-timeout 20;
                 after-sb-0pri discard-zero-changes;
                 after-sb-1pri discard-secondary;
                 after-sb-2pri disconnect;
         }

         syncer {
                 rate 100M;
         }
}

/etc/drbd.d/drbd0.res:

resource drbd0 {

on mail01.domain.org {
device /dev/drbd0;
disk /dev/sda9;
address 192.168.1.1:7789;
meta-disk internal;
}

on mail02.domain.org {
device /dev/drbd0;
disk /dev/sda9;
address 192.168.1.2:7789;
meta-disk internal;
}

  }


-- 
Best regards,
Proskurin Kirill



More information about the drbd-user mailing list