[DRBD-user] Question regarding transition procedure

Lars Ellenberg Lars.Ellenberg at linbit.com
Tue Jan 27 01:51:24 CET 2004

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

/ 2004-01-26 15:58:19 -0800
\ Brian Thomas:

> My plan right now is:
> Make sure drbd/heartbeat does NOT start on boot
> Bring up both systems, verify drbd is not running/synced.
> Load drbd modules on each system.
> On System 2 (STALE copy):
> drbdsetup /dev/nb0 disk /dev/sda1
> drbdsetup /dev/nb1 disk /dev/sdb1
> drbdsetup /dev/nb0 net B
> drbdsetup /dev/nb1 net B
> On System 1 (GOOD copy):
> drbdsetup /dev/nb0 disk /dev/sda1
> drbdsetup /dev/nb1 disk /dev/sdb1
> drbdsetup /dev/nb0 primary
> drbdsetup /dev/nb1 primary
> drbdsetup /dev/nb0 net B
> drbdsetup /dev/nb1 net B

I suggest doing it the other way around:
start it on the good copy. /etc/init.d/drbd start
make it primary. drbdsetup /dev/nb0 primary --human

THEN start it on the "STALE".

you now should see a FULL sync.

you need a full sync anyways, since drbd mirrors at the block
level, whereas rsync mirrors at file system level.

> At this point, I'll verify the partitions are syncing as expected, and
> System 1 is the primary. (If it's not I'm screwed.) Note that in this
> example, whereas the sdb1 pair was nb0, now it'll be nb1.

be *VERY* carefull with the meta data: it is stored in
/var/lib/drbd[0-9], and is only identified by the minor number.
so if you change drbd minors for your lower level devices, make
sure you move the metadata files, or better *remove* them

in your case, it seems to me that if you are carefull, you can
avoid a full sync at least on the pair of drbd that you had
already running.

> If everything's going ok, then on System 1 I'll crank up heartbeat
> with '/etc/init.d/heartbeat start'. datadisk may complain a little about
> seeing the volumes already started, but within a minute I should see
> System 1 become the master heartbeat node, at which time I can safely
> crank up System 2's heartbeat.
> Does all this make sense? Is there anything else I need to/can do to
> make absolutely sure that System 1's copy of the data will be the
> 'real' one?

see the --human flag, it takes precedence over all other
"generation counters" on connect time.

	Lars Ellenberg

More information about the drbd-user mailing list