[DRBD-user] How to customize the size of a DRBD partition ?

Martin Bene martin.bene at icomedias.com
Sat Sep 3 07:36:58 CEST 2005

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


Hi Fabrice,

Your problems sound like you created the filesystem on the lower device
(dev/hda..), not on /dev/drbd...

Since you're using "metadata internal", drbd reserves 128MB of the
device for its own use, so the size available for the filesystem is
partition size - 128MB.

If you created the filesystem on /dev/hda7, it includes the space
reserved by drbd thus giving you errors "attempt to access beyond end of
device".

Solution: 

1) you'll want to create bigger partitions since there's practically
nothing left for use by the fileystem if partition size is approx.
128MB. Alternatively you can create seperate metadata partitions.
2) create the filesystem on the drbd device so you get the filesyste
size right.

> (ext3|reiserfs|xfs|jfs|vfat|fat|nfs) is recommended for mounting drbd
> partitions ?

You certainly want to use a journaling filesystem with drbd: a failover
for the device generally happens without clean unmount, so you'd have to
run a filesystem check before mounting with a non-journaling filesystem
- a time consuming task usually not suited to a high availability
environment. This rules out the fat based formats. Nfs is a network
filesystem, so that's out as well. The rest should all work.

I've been using ext3 on drbd for quite a few systems and am now looking
into xfs for a new installation; if you don't need to tune for maximum
performance, and don't have unusual filesystem contents (lots of small
files, thousands of files in one directory...) ext3 probably has least
potential for surprises.

If you try xfs, make sure you select 8kb kernel stack size- reports
indicate that you can expect problems with xfs on drbd with 4k kernel
stacks.

Hope this helps,

Martin



More information about the drbd-user mailing list