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

Fabrice Durand durand.fabrice at gmail.com
Tue Sep 6 11:52:25 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.


Hello,
Thanks for replying. So we have chosen the first solution you
suggested, ie create bigger partitions. So we have created partitions
of 256 MB. Now on each node (if he is primary),
the df -h command gives :

Filesystem     Size      Use       Avail      Use%     Mounted on
/dev/drbd0      250M     20M      218M     9%         /montagedrbd

So the size of the partition seems to be 250M whereas it's supposed to be 256 M.
Do you what couls explain this difference and if it is acceptable ?

Thanks,
Fabrice

On 9/3/05, Martin Bene <martin.bene at icomedias.com> wrote:
> 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