[DRBD-user] formatting of drbd partition

Adrian Hicks adrian.h at auston.edu.sg
Fri Sep 1 04:26:25 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.


I've also used a previously single machine to build a cluster.

Basically what I did was this:

* Shrink the data partition (unless there is already free space on the
disk) to create
   enough free space to provide 128 megabytes for each drbd device.
* Create a partition on this free space
* Configure DRBD to use the data partition for its drbd resource/device
and also
   to use the new partition for its meta data (read the doc's)
* Configure the new machine for the cluster with the same size data
partition
   and the same size partition for the meta data, format both, install
drbd etc. on the
   new box.
* Once drbd is configured on both machines, unmount the original data
partition and
   comment out the line in /etc/fstab for that partition, plus comment
out the same line
   on the new machine and unmount the partition.
* Start the drbd daemon ("/etc/init.d/drbd start" in Debian).
* On the original machine with the data, do:
     drbdadm -- --do-what-I-say primary all

The above should set your original machine as the synchronisation source
which will copy your data to the new machine.  You will then be able to
either use the command line or Heartbeat to manage the starting &
stopping of the drbd device, plus mounting and unmounting the drbd
device to the mount point.

I've probably left out some steps, but the above is basically what I did.


Adrian Hicks


On 8/31/2006, "Corey Edwards" <tensai at zmonkey.org> wrote:

>On Thu, 2006-08-31 at 04:09 -0700, khaja mohideen wrote:
>> Hi,
>> 
>>   What would happen if i mount the 100 GB
>> partition(/dev/hda1) without formatting as /dev/drbd0.
>
>Bad Things(tm) would happen. Namely DRBD would not replicate any of your
>data and all your effort would be wasted.
>
>>    In slave I would allocate the exact 100 GB size for
>> drbd.
>
>The slave would never see any of the data from master because you're
>bypassing DRBD.
>
>>   Then would it solve.
>
>No, it wouldn't. This road leads only to madness. Please re-read the
>DRBD documentation as you don't appear to have a solid grasp on it.
>
>It *is* possible to add DRBD to an existing partition without losing
>data. I have done it on a number of occasions with very much mission
>critical data. Do yourself a favor and practice a few times before
>trying it for real.
>
>Corey
>
>
>



More information about the drbd-user mailing list