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

Fabrice Durand durand.fabrice at gmail.com
Tue Sep 6 12:56:22 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.


On 9/6/05, Martin Bene <martin.bene at icomedias.com> wrote:
> > 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 ?
> 
> Still far too much available space. How did you create the fielsystems?
> If you're using metadata internal you _MUST_ create the filesystem on
> the drbd device, not on the /dev/hdxxx device.
> 
> On a 256MB partition the result should be ~128 MB usable by the
> filesystem.
> 
> Please show -
> cat /proc/partitions
> cat /etc/drbd.conf
> 
> Full command used to create the filesystem.
> 
> Bye, Martin

We have created the filesystem with the command
mkfs -t ext3 /dev/hdaxx
And one can notice that the more I fill the partition the more the
available space decrease.
For example I coud sature the disk by putting 126 M before the
plantage (iterating at the end with files of 4 MB). After rebooting
the df -h command gives :
Filesystem     Size      Use       Avail      Use%     Mounted on
/dev/drbd0      250M     126M      111M     53%         /montagedrbd

whereas before it gave :
Filesystem     Size      Use       Avail      Use%     Mounted on
/dev/drbd0      250M     20M      218M     9%         /montagedrbd

and just after the creation it gaves :
Filesystem     Size      Use       Avail      Use%     Mounted on
/dev/drbd0      250M     8.8M      228M     4%         /montagedrbd

> cat /proc/partitions
major minor  #blocks  name

   3     0    9770544 hda
   3     1    3908488 hda1
   3     2          1 hda2
   3     5    3908488 hda5
   3     6     778648 hda6
   3     7     264568 hda7     ////comment : used for the drdb
partition on first node.


> cat /etc/drbd.conf

resource drbd0 {
protocol C;

# Temps d'attente du deuxieme noeud
startup {
  wfc-timeout 10;
}

disk {
  on-io-error pass_on;
}
net     {
  timeout 60;
  connect-int 10;
  ping-int 10;
  on-disconnect reconnect;
  max-buffers 2048;
  max-epoch-size 2048;
}
syncer  {
  rate 8M; group 2;
}

on EEPCLU1 {
  device /dev/drbd0;
  disk /dev/hda7;
  address 135.9.216.42:7789;
  meta-disk internal;
}

on EEPCLU2 {
  device /dev/drbd0;
  disk /dev/hda8;
  address 135.9.216.44:7789;
  meta-disk internal;
}

}

Thanks a lot,
Fabrice



More information about the drbd-user mailing list