[DRBD-user] any objections on shrinking the Metadata?

Martin Peylo martinmeis at googlemail.com
Mon Mar 13 14:10:19 CET 2006

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

Hello all,

I'd need to use drbd on a lot of small partitions. One bit of Metatdata
represents 4096 bit as far as I understood. So 128 MB represent up to 4TB.
I have limited hardware and would like not to waste space.

Since I only need to have e.g. a partition with 256MB usable size,
I guess (2^8 * 2^20) / 2^12 bit = 2^16 bit = 8192 B would be enough. For
that is only the space for the bitmap and needs some additional space for
rest of the MD.

As far as I understood the following definitions in drbd/drbd_int.h:
- #define MD_GC_OFFSET 0
- #define MD_AL_OFFSET 8      // 8 Sectors after start of meta area
- #define MD_AL_MAX_SIZE 64   // = 32 kb LOG  ~ 3776 extents ~ 14 GB Storage

- #define MD_BM_OFFSET (MD_AL_OFFSET + MD_AL_MAX_SIZE) //Allows up to about

the rest of the MD would be (please correct me if I'm wrong):
- GC (means ?): 8 Sectors = 8*4096bit = 4KB
- AL ("Action Log"): 64 Sectors = 64*4096bit = 32KB

so the MD would be 36KB plus the size of the bitmap?

I did some tests and adjusted the
#define MD_RESERVED_SIZE ( 128LU * (1<<10) )  // 128 MB  ( in units of kb )
line in drbd/drbd_int.h to e.g. (still more than enough):
#define MD_RESERVED_SIZE ( 1LU * (1<<10) )  // 1 MB  ( in units of kb )
and experienced no unexpected behaviour while playing around with a newly
created partition.

So my question is - has anyone tried that before? Does anyone see any
problems when I use that in an working environment? Do I have major bugs
in my calculations?

I tried to analyze the code to find something that forbids it but I didn't
anything. I found a comment that I should use version 0.6 if I want to have
it for small devices but if it works like that I could use 0.7 until
0.8(with dynamic
BM size?) will be released.

Some facts:
- I used drbd 0.7.16 for the tests.
- All my partitions will have the same size which will *never* be altered.
- When I tried with MD below the calculated size I experienced problems.
  (writes to the MD "killed" the filesystem since parts were overwritten)

Thanks for all comments
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20060313/7236f076/attachment.htm>

More information about the drbd-user mailing list