[DRBD-user] Newbie Question

Mark Watts m.watts at eris.qinetiq.com
Thu Nov 6 18:08:25 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 16:42:45 Allen Chen wrote:
> Mark, thanks a lot for your help...a couple questions:

> > You can do this, but its a little complicated. (And performance may
> > stink)
>
> Why do you say performance may stink? Would you recommend me having one
> primary server running development and database, backed up with the
> secondary server?

You'll get roughly double the I/O on each machine because it's having to do 
I/O for each database. Depending on how fast your disks and network 
interconnect are, this may adversly affect performance; especially on the 
production database.

> > 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>
>
> What do you mean by <drbd>? Does it matter what mount point I use for
> this?

No the mount point doesn't matter, but that'll (probably) be controlled by the 
drbddisk resource agent for heartbeat, so you'll probably never mount it by 
hand (except maybe initially for testing).
Don't forget that because you have two resources than can possibly me mounted 
on the same machine at the same time, you'll want to mount them on different 
mount points. Eg:
	/dev/drbd0 -> /export/production-db
	/dev/drbd1 -> /export/testing-db

> Also, how does drbd know what /dev/drbd0 is? Do I have to set this
> somewhere?

You are setting it, in drbd.conf - thats exactly what the "device /dev/drbd0" 
line is defining.

DRBD is an extra layer on-top of the disk and under the filesystem.
If you wanted to you could have:

Raw disks:
	/dev/sda
	/dev/sdb
Turn them into a software mirror:
	/dev/md0
Put LVM on top:
	/dev/mapper/vg0-root
	/dev/mapper/vg0-swap
	/dev/mapper/vg0-drbd_raw0
	/dev/mapper/vg0-drbd_raw1
Add DRBD:
	/dev/drbd0 (made from /dev/mapper/vg0-drbd_raw0 on each box)
	/dev/drbd1 (made from /dev/mapper/vg0-drbd_raw1 on each box)
Make filesystems:
	mke2fs -j /dev/drbd0
	mke2fs -j /dev/drbd1
Mount them (via heartbeat when you're in a cluster):
	mount /dev/drbd0 /export/production-db
	mount /dev/drbd0 /export/testing-db

And so on...

Mark.

-- 
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/fc46b21f/attachment.pgp>


More information about the drbd-user mailing list