[DRBD-user] initial formatting of /dev/drbd0 device (with internal metadata)

Brett Bolen hbbolen at yahoo.com
Tue Mar 22 16:36:41 CET 2005

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


If I want to setup drbd on a blank disk, do I need to compute
the size of the partition ( or does the drbd drive do this for
me)?

Say I have a 1 GB partition on moe's /dev/sda1, and something similar
on larrys /dev/sdb1.

When I initially format moe's drive, can I just

   mke2fs -j /dev/sda1

or do something like

   mke2fs -j /dev/sda1 <nnnn>

where n =  ( 1G - 128 M) / 4096
            ( 1024^3 - 128*1024^2) / 4096
            ( 1073741824 - 134217728) / 4096
            229376

alternatively, If I have an existing file system,
I can use

    resize2fs /dev/sda1 <nnnn>

Where <nnnn> is computed the same as above?


Also,

Where do I find the initial size of the partition?  df
gives me one number ( in 1k blocks), and fdisk gives me another
number.

In fact, dump2efs give me a third number.

here's my numbers for my real hdisk ( not the example I gave above):

   df       -> 15480832 ( 1K blocks) => 15480832
   fdisk    -> 15727635              => 15727635
   dumpe2fs ->  3931908 ( 4k blocks) => 15727632

What is the correct way to determine these numbers?

Thanks
b²







More information about the drbd-user mailing list