[DRBD-user] Question regarding transition procedure

Brian Thomas bthomas at wolfgeek.net
Tue Jan 27 00:58:19 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.

I've got a pair of systems with a pair of volumes that, due to a
previously discussed problem with large partition sizes, is running
only one pair using drbd. i.e.:

System 1	       System 2

  sda1 -------RSYNC------ sda1
  sdb1 -------DRBD0----- sdb1

The sda1's are kept in sync with periodic rsync's, as shown above.

Now that we have the problem resolved, I'd like to change it so sdb1
is using DRBD as well. But the trick is, System 2's sdb1 is not
necessarily up to date/in sync with System 1's -- It is VERY IMPORTANT
that as a part of this change that System 1's sdb1 is the PRIMARY copy
of the data. (For reasons not worth going into here, it's non-feasible
to sync this data before the copy)

My plan right now is to move these disks that comprise these volumes
to another pair of systems, one that's been built all spankin' new and
clean that has drbd properly integrated with heartbeat. The only thing
I need to make absolutely sure of is that everything comes up in an
order where I can clearly control which system is the primary/master
heartbeat node.

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

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.

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?


More information about the drbd-user mailing list