Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Hi Lars, Lars Ellenberg <lars.ellenberg at linbit.com> writes: > On Thu, Jul 11, 2013 at 05:32:00PM +0900, Hiroshi Fujishima wrote: >> Hi all, >> >> With drbd-8.4.3, I noticed that performing `drbdadm attach r0' with a >> newly-initialized empty disk causes initial full synchronization. >> >> In the following document, it seems it is necessary to perform `drbdadm >> primary --force resource' to start the initial full synchronization. > > If you follow the proper sequence (*create-md* first, then attach, then > connect). Thank you for your quick reply. In the procedure in my previous mail, the Connection State was Connected because of having done `service drbd start'. So I tested `drbdadm disconnect' before performing create-md. Then this time both device state turned into Inconsistent, initial full synchronization did not start. This is what I needed. Thank you! Following is the procedure I tested this time: * initialize backing device [root at nodea ~]# MegaCli ldinit start l2 a0 Start Initialization on Virtual Drive 2 (target id: 2) Success. Exit Code: 0x00 [root at nodeb ~]# MegaCli ldinit start l2 a0 Start Initialization on Virtual Drive 2 (target id: 2) Success. Exit Code: 0x00 * service drbd start [root at nodea ~]# service drbd start Starting DRBD resources: [ create res: r0 prepare disk: r0 adjust disk: r0:failed(apply-al:255) adjust net: r0 ] .... [root at nodeb ~]# service drbd start Starting DRBD resources: [ create res: r0 prepare disk: r0 adjust disk: r0:failed(apply-al:255) adjust net: r0 ] . * executing `service drbd start' makes connection state online, so execute `drbdadm disconnect' [root at nodea ~]# cat /proc/drbd version: 8.4.3 (api:1/proto:86-101) GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by root at nodea, 2013-07-09 17:08:55 0: cs:Connected ro:Secondary/Secondary ds:Diskless/Diskless C r----- ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0 [root at nodea ~]# drbdadm disconnect r0 [root at nodea ~]# cat /proc/drbd version: 8.4.3 (api:1/proto:86-101) GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by root at nodea, 2013-07-09 17:08:55 0: cs:Unconfigured [root at nodeb ~]# cat /proc/drbd version: 8.4.3 (api:1/proto:86-101) GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by root at nodeb, 2013-07-09 17:10:11 0: cs:WFConnection ro:Secondary/Unknown ds:Diskless/DUnknown C r----- ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0 [root at nodeb ~]# drbdadm disconnect r0 [root at nodeb ~]# cat /proc/drbd version: 8.4.3 (api:1/proto:86-101) GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by root at nodeb, 2013-07-09 17:10:11 0: cs:Unconfigured * createing metadata [root at nodea ~]# drbdadm create-md r0 Writing meta data... initializing activity log NOT initializing bitmap New drbd meta data block successfully created. success [root at nodeb ~]# drbdadm create-md r0 Writing meta data... initializing activity log NOT initializing bitmap New drbd meta data block successfully created. success * device attach [root at nodea ~]# cat /proc/drbd version: 8.4.3 (api:1/proto:86-101) GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by root at nodea, 2013-07-09 17:08:55 0: cs:Unconfigured [root at nodea ~]# drbdadm attach r0 [root at nodea ~]# cat /proc/drbd version: 8.4.3 (api:1/proto:86-101) GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by root at nodea, 2013-07-09 17:08:55 0: cs:StandAlone ro:Secondary/Unknown ds:Inconsistent/DUnknown r----s ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:2147417308 [root at nodeb ~]# cat /proc/drbd version: 8.4.3 (api:1/proto:86-101) GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by root at nodeb, 2013-07-09 17:10:11 0: cs:Unconfigured [root at nodeb ~]# drbdadm attach r0 [root at nodeb ~]# cat /proc/drbd version: 8.4.3 (api:1/proto:86-101) GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by root at nodeb, 2013-07-09 17:10:11 0: cs:StandAlone ro:Secondary/Unknown ds:Inconsistent/DUnknown r----s ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:2147417308 * connecting to its peer device [root at nodea ~]# drbdadm connect r0 [root at nodea ~]# cat /proc/drbd version: 8.4.3 (api:1/proto:86-101) GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by root at nodea, 2013-07-09 17:08:55 0: cs:WFConnection ro:Secondary/Unknown ds:Inconsistent/DUnknown C r----s ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:2147417308 [root at nodeb ~]# drbdadm connect r0 [root at nodeb ~]# cat /proc/drbd version: 8.4.3 (api:1/proto:86-101) GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by root at nodeb, 2013-07-09 17:10:11 0: cs:Connected ro:Secondary/Secondary ds:Inconsistent/Inconsistent C r----- ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:2147417308 => both device state is Inconsistent (not UpToDate) Regards, -- Hiroshi Fujishima