[DRBD-user] The drbd hdd change.How to start synchronization?

MP mpullmann at centrum.cz
Thu Aug 10 15:13:21 CEST 2006

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


>/ Hi,
/>/ 
/>/ I have 2 server in StandAlone mode. Is there a way how to tell server
/>/ 1 to by the Primary and the server 2 will be secondary.
/>/ 
/>/ In server 2 is new hdd the old one was dead. On server 1 are the data
/>/ that should synchronize to the server 2.  Before the hdd from server 2
/>/ die the drbd works fine. Nothing change to the config.
/
you have:
	cat /proc/drbd
	 (all StandAlone Secondary/Unknown)

you should:
 good server: drbdadm primary all
              cat /proc/drbd # verify all are Primary 
	      drbdadm connect all
              cat /proc/drbd # verify all are WFConnection Primary

 bad server: drbdadm connect all

watch cat /proc/drbd
drbd should connect now, and likely do a full sync.

in case it does not do a full sync,
you can "bad server# drbdadm invalidate all" 
(since you replaced the disk, you obviously need a full sync, 
 there is no data to base an "incremental" sync on)

I do all that what you recommend but without avail.


hpedi2:~ # cat /proc/drbd
version: 0.7.14 (api:77/proto:74)
SVN Revision: 1990 build by root at descartes, 2006-01-21 01:50:56
 0: cs:WFConnection st:Primary/Unknown ld:Consistent
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0

hpedi1 at root#/root > /etc/init.d/drbd start

Aug 10 15:07:52 hpedi1 kernel: drbd: initialised. Version: 0.7.14 (api:77/proto:74)
Aug 10 15:07:52 hpedi1 kernel: drbd: SVN Revision: 1990 build by root at descartes, 2006-01-21 01:50:56
Aug 10 15:07:52 hpedi1 kernel: drbd: hijacking NBD device major!
Aug 10 15:07:52 hpedi1 kernel: drbd: registered as block device major 43
Aug 10 15:07:52 hpedi1 kernel: drbd0: resync bitmap: bits=14595072 words=456096
Aug 10 15:07:52 hpedi1 kernel: drbd0: size = 55 GB (58380288 KB)
Aug 10 15:07:52 hpedi1 kernel: klogd 1.4.1, ---------- state change ----------
Aug 10 15:07:52 hpedi1 /etc/hotplug/block.agent[7513]: try 1 while waiting for /block/drbd0's bus_id
Aug 10 15:07:53 hpedi1 /etc/hotplug/block.agent[7513]: try 2 while waiting for /block/drbd0's bus_id
Aug 10 15:07:54 hpedi1 /etc/hotplug/block.agent[7513]: try 3 while waiting for /block/drbd0's bus_id
Aug 10 15:07:55 hpedi1 /etc/hotplug/block.agent[7513]: try 4 while waiting for /block/drbd0's bus_id
Aug 10 15:07:56 hpedi1 /etc/hotplug/block.agent[7513]: try 5 while waiting for /block/drbd0's bus_id
Aug 10 15:07:57 hpedi1 /etc/hotplug/block.agent[7513]: new block device /block/drbd0
Aug 10 15:08:01 hpedi1 /USR/SBIN/CRON[7550]: (actis) CMD (/bin/sh /edi/tools/provespace)
Aug 10 15:08:03 hpedi1 kernel: drbd0: 5048 MB marked out-of-sync by on disk bit-map.
Aug 10 15:08:03 hpedi1 kernel: drbd0: Found 6 transactions (324 active extents) in activity log.
Aug 10 15:08:03 hpedi1 kernel: drbd0: drbdsetup [7527]: cstate Unconfigured --> StandAlone
Aug 10 15:08:03 hpedi1 kernel: drbd0: drbdsetup [7568]: cstate StandAlone --> Unconnected
Aug 10 15:08:03 hpedi1 kernel: drbd0: drbd0_receiver [7569]: cstate Unconnected --> WFConnection
Aug 10 15:08:03 hpedi1 kernel: drbd0: drbd0_receiver [7569]: cstate WFConnection --> WFReportParams
Aug 10 15:08:03 hpedi1 kernel: drbd0: Handshake successful: DRBD Network Protocol version 74
Aug 10 15:08:03 hpedi1 kernel: drbd0: Connection established.
Aug 10 15:08:03 hpedi1 kernel: drbd0: I am(S): 1:0000001b:00000002:0000004f:00000012:00
Aug 10 15:08:03 hpedi1 kernel: drbd0: Peer(P): 1:00000014:00000002:0000005e:00000012:10
Aug 10 15:08:03 hpedi1 kernel: drbd0: drbd0_receiver [7569]: cstate WFReportParams --> WFBitMapS
Aug 10 15:08:03 hpedi1 kernel: drbd0: sock_sendmsg returned -104
Aug 10 15:08:03 hpedi1 kernel: drbd0: drbd0_receiver [7569]: cstate WFBitMapS --> BrokenPipe
Aug 10 15:08:03 hpedi1 kernel: drbd0: short sent ReportBitMap size=4096 sent=0
Aug 10 15:08:03 hpedi1 kernel: drbd0: Secondary/Unknown --> Secondary/Primary
Aug 10 15:08:03 hpedi1 kernel: drbd0: meta connection shut down by peer.
Aug 10 15:08:03 hpedi1 kernel: drbd0: asender terminated
Aug 10 15:08:03 hpedi1 kernel: drbd0: sock was shut down by peer
Aug 10 15:08:03 hpedi1 kernel: drbd0: drbd0_receiver [7569]: cstate BrokenPipe --> BrokenPipe
Aug 10 15:08:03 hpedi1 kernel: drbd0: short read expecting header on sock: r=0
Aug 10 15:08:03 hpedi1 kernel: drbd0: worker terminated
Aug 10 15:08:03 hpedi1 kernel: drbd0: drbd0_receiver [7569]: cstate BrokenPipe --> Unconnected
Aug 10 15:08:03 hpedi1 kernel: drbd0: Connection lost.
Aug 10 15:08:03 hpedi1 kernel: drbd0: drbd0_receiver [7569]: cstate Unconnected --> WFConnection

hpedi2:~ # cat /proc/drbd
version: 0.7.14 (api:77/proto:74)
SVN Revision: 1990 build by root at descartes, 2006-01-21 01:50:56
 0: cs:StandAlone st:Primary/Unknown ld:Consistent
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0

Aug 10 15:08:03 hpedi2 kernel: drbd0: drbd0_receiver [12303]: cstate WFConnection --> WFReportParams
Aug 10 15:08:03 hpedi2 kernel: drbd0: Handshake successful: DRBD Network Protocol version 74
Aug 10 15:08:03 hpedi2 kernel: drbd0: Connection established.
Aug 10 15:08:03 hpedi2 kernel: drbd0: I am(P): 1:00000014:00000002:0000005e:00000012:10
Aug 10 15:08:03 hpedi2 kernel: drbd0: Peer(S): 1:0000001b:00000002:0000004f:00000012:00
Aug 10 15:08:03 hpedi2 kernel: drbd0: Current Primary shall become sync TARGET! Aborting to prevent data corruption.
Aug 10 15:08:03 hpedi2 kernel: drbd0: drbd0_receiver [12303]: cstate WFReportParams --> StandAlone
Aug 10 15:08:03 hpedi2 kernel: drbd0: error receiving ReportParams, l: 72!
Aug 10 15:08:03 hpedi2 kernel: drbd0: worker terminated
Aug 10 15:08:03 hpedi2 kernel: drbd0: asender terminated
Aug 10 15:08:03 hpedi2 kernel: drbd0: drbd0_receiver [12303]: cstate StandAlone --> StandAlone
Aug 10 15:08:03 hpedi2 kernel: drbd0: Connection lost.
Aug 10 15:08:03 hpedi2 kernel: drbd0: receiver terminated

hpedi1 at root#/root > drbdadm invalidate all
ioctl(,INVALIDATE,) failed: Operation now in progress
Only in 'Connected' cstate possible.
Command '/sbin/drbdsetup /dev/nb0 invalidate' terminated with exit code 20
drbdsetup exited with code 20

hpedi2:~ # cat /proc/drbd
version: 0.7.14 (api:77/proto:74)
SVN Revision: 1990 build by root at descartes, 2006-01-21 01:50:56
 0: cs:StandAlone st:Primary/Unknown ld:Consistent
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0

hpedi1 at root#/root > cat /proc/drbd
version: 0.7.14 (api:77/proto:74)
SVN Revision: 1990 build by root at descartes, 2006-01-21 01:50:56
 0: cs:WFConnection st:Secondary/Unknown ld:Consistent
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0









-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20060810/87a750ad/attachment.htm>


More information about the drbd-user mailing list