[DRBD-user] meta-disk

Chris Procter chris.procter at openminds.co.uk
Thu Jan 5 12:00:29 CET 2006

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


On Wednesday 04 January 2006 20:07, Chip Burke wrote:

> I think I am missing something very basic. Do I need to create a partition
> on the system specifically for the meta-data or something else? I have read
> the drbd.conf notes about 10 times and I really don't understand what they
> mean.

As with all good questions the answer is "it depends".

DRBD needs to store 128MB of metadata some where on the system to store the 
list of which blocks have changed (its stored on disk so it persists across 
reboots). This metadata can be stored in one of two places.

It can be stored on the partition you are replicating (termed "internal" 
metadata) in which case it basically takes over the last 128MB of the 
partition, reducing the space you have to store data in and overwriting and 
data that is already stored there. This is good if you are starting fresh and 
can overwrite the diskspace without risking the data or dont have room to 
create a separate partition. 
For this you put:
meta-disk internal;
in the drbd.conf for each machine (the "on [hostname]" section).

Alternatively you can store the metadata on a separate partition ("external" 
metadata) in which case (obviously) you need to create a partition to use. 
This partition needs to be at least 128MB for each DRBD device you are using 
and is setup in the drbd.conf file as: 
meta-disk [devicename] [[offset]];
e.g.
meta-disk /dev/hde5 [0];

The number in brackets is an offset within the partition, so the above will 
use the first 128MB of the /dev/hde5 partion to store meta data, you could 
then set up another drbd device (/dev/drbd1 say) with 
meta-disk /dev/hde5 [1];
which would use the second 128MB (obviously the partition would need to be at 
least 256MB in size). You would then have the meta data for /dev/drbd0 in 
0-127MB and for /dev/drbd1 in 128-256MB on /dev/hde5

There are probably performance reasons for using one over the other, and there 
are certainly issues with diskspace (if you dont have space to create a 
seperate partion the internal is the way forward for example). In theory you 
could configure drbd to use internal metadata on one machine and external for 
the same device on the other machine. If you do this however you're on your 
own :-)

Your error message implies that the meta-disk you are using is less then 128MB 
in size. I'm not sure if it defaults to something if you dont define it in 
drbd.conf so its worth checking to make sure it is explicitly defined to 
something sensible.

Thats the way I understand it anyway, hope it helps.

chris



More information about the drbd-user mailing list