[DRBD-user] Newbie Question

Mark Watts m.watts at eris.qinetiq.com
Thu Nov 6 16:15:54 CET 2008

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

On Thursday 06 November 2008 14:44:05 Allen Chen wrote:
> Hi,
> I am new to drbd, but it seems like something I'd like to use.
> I'm not sure where I should have found info about this so I hope this is
> the place...
> >From the tutorial:
> resource r0 {
>   on alice {
>     device    /dev/drbd1;
>     disk      /dev/sda7;
>     address;
>     meta-disk internal;
>   }
> How do I decide what the disk is? Is this something I have to decide and
> set during partition and install of the OS?


> Right now I have two servers 
> with 2 hard drives each. I would like one server to be development server
> and one to be database server, each using one hard disk. The remaining two
> hard disks would be the drbd 'backup' of the other, and cross the servers
> so the backups would be on different servers. Hence one server would be
> primary development/secondary database, while the other one is primary
> database/secondary development. I am running Red Hat EL 5.2. While
> partitioning I set a partition /backup for the secondary disk, with the
> intention that /backup is where the secondary drbd image goes.

You can do this, but its a little complicated. (And performance may stink)

The way I'd probably approach it is thus: (Assuming, for example, 100GB disks)

	Partition 1 = 10GB = /
	Partition 2 = 2GB = Swap
	Partition 3 = 88GB = <drbd>

You'd configure the exact same partition layout on *ALL* disks, even though 
you won't be using / and swap on the secondary disk in each node.
(This is to ensure that the actual partition you're replicating has the same 
block-count on each disk).

If you have /dev/sda and /dev/sdb, you'd have a drbd.conf like this:

resource r0 {
	device	/dev/drbd0;	
	meta-disk internal;
	on server1 {
		disk      /dev/sda3;
	on server2 {
		disk      /dev/sdb3;

resource r1
	device	/dev/drbd1;	
	meta-disk internal;
	on server1 {
		disk      /dev/sdb3;
	on server2 {
		disk      /dev/sda3;

One key assumption of course, is that you have two independant database 
configurations, so that both database instances can potentially be running on 
the same node at the same time.


Mark Watts BSc RHCE MBCS
Senior Systems Engineer
QinetiQ Applied Technologies
GPG Key: http://www.linux-corner.info/mwatts.gpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20081106/30bf6051/attachment.pgp>

More information about the drbd-user mailing list