[DRBD-user] Initial sync, just want to confirm the process (and not go down in a blaze of glory)

adamn at eyemedia.com.au adamn at eyemedia.com.au
Thu Aug 12 07:16:10 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.


Hi all,

Just a bit nervous on this setup as I have ~4TB of live data on my primary 
and I'm about to bring the seconday online (after a couple of weeks from 
putting the primary online) and want to make 100% I don't sink the ship.

Basically I have setup a ubuntu server and did the following with drbd.
(very basic out of the box setup)

root at storage00:~# apt-get install drbd8-utils drbd8-source
root at storage00:~# vim /etc/drbd.conf
root at storage00:/etc# cat drbd.conf
global {
        usage-count no;
}

common {
        syncer { rate 110M; }
}
resource meta {
        protocol C;
        handlers {
         pri-on-incon-degr "echo O > /proc/sysrq-trigger ; halt -f";
         pri-lost-after-sb "echo O > /proc/sysrq-trigger ; halt -f";
         local-io-error "echo O > /proc/sysrq-trigger ; halt -f";
        }

        startup {
         # wfc-timeout 0;
         degr-wfc-timeout 120; # 2 minutes.
        }
        disk {
         on-io-error detach;
        }

        net {
         after-sb-0pri disconnect;
         after-sb-1pri disconnect;
         after-sb-2pri disconnect;
         rr-conflict disconnect;
        }

        syncer {
         # rate 110M;
         # after "r2";
         al-extents 257;
        }

        on storage00 {
         device /dev/drbd0;
         disk /dev/sda3;
         address 192.168.1.10:7788;
         meta-disk internal;
        }

        on storage01 {
         device /dev/drbd0;
         disk /dev/sda3;
         address 192.168.1.11:7788;
         meta-disk internal;
        }
}

resource data {
        protocol C;
        startup {
         wfc-timeout 0; ## Infinite!
         degr-wfc-timeout 120; ## 2 minutes.
        }

        disk {
         on-io-error detach;
        }

        net {
         # timeout 60;
         # connect-int 10;
         # ping-int 10;
         # max-buffers 2048;
         # max-epoch-size 2048;
        }

        syncer {
         after "meta";
        }

        on storage00 {
         device /dev/drbd1;
         disk /dev/sdb1;
         address 192.168.1.10:7789;
         meta-disk internal;
        }
        on storage01 {
         device /dev/drbd1;
         disk /dev/sdb1;
         address 192.168.1.11:7789;
         meta-disk internal;
        }
}

root at storage00:~# drbdadm create-md meta
root at storage00:~# drbdadm create-md data
root at storage00:~# /etc/init.d/drbd start
root at storage00:~# drbdsetup /dev/drbd0 primary -o
root at storage00:~# drbdsetup /dev/drbd1 primary -o
root at storage00:/etc# cat /proc/drbd
version: 8.3.7 (api:88/proto:86-91)
GIT-hash: ea9e28dbff98e331a62bcbcc63a6135808fe2917 build by 
root at storage00, 2010-07-21 18:41:33
 0: cs:WFConnection ro:Primary/Unknown ds:UpToDate/DUnknown C r----
    ns:0 nr:0 dw:5464 dr:1341 al:18 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b 
oos:1727396
 1: cs:WFConnection ro:Primary/Unknown ds:UpToDate/DUnknown C r----
    ns:0 nr:0 dw:678284585 dr:143229358 al:17981154 bm:17981027 lo:0 pe:0 
ua:0 ap:0 ep:1 wo:b oos:5833965664

So this box has been live for a couple of weeks now, it's running ietd 
iscsi, lvm etc, and has around 4TB of data on drbd1.
Both machines are connected via a gigabit switch. They can ping each other 
on 192.168.1.x interface. (there are 6 nics in the box, 4 for iscsi, 1 for 
management, 1 dedicated to DRBD).

Now I want to connect the secondary up (it's identical spec as the 
primary, including OS, install etc).
Here is where I'm at on the secondary:
root at storage00:~# apt-get install lvm2
root at storage01:~# apt-get install drbd8-utils drbd8-source
root at storage01:~# scp root at storage00:/etc/drbd.conf /etc/

Now I need to reboot here, (due to the LVM module), now my gut is saying 
it should all be ok, but of course drbd is going to fire up on reboot, 
what is my process from here?
Will it be ok for the reboot, see as this will be the first time drbd 
starts on the secondary and connects to the primary?
What needs to be issued for the sync to start, I have already issued 
root at storage00:~# drbdsetup /dev/drbd0 primary -o
root at storage00:~# drbdsetup /dev/drbd1 primary -o
on the primary, will the secondary node know this and just start syncing?
Will I have to issue
drbdadm -- --overwrite-data-of-peer primary drbd0
drbdadm -- --overwrite-data-of-peer primary drbd1
on the primary node?

Regards,
Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20100812/2282871e/attachment.htm>


More information about the drbd-user mailing list