Hello all,<br><br>I'd need to use drbd on a lot of small partitions. One bit of Metatdata <br>represents 4096 bit as far as I understood. So 128 MB represent up to 4TB.<br>I have limited hardware and would like not to waste space.
<br><br>Since I only need to have e.g. a partition with 256MB usable size, <br>I guess (2^8 * 2^20) / 2^12 bit = 2^16 bit = 8192 B would be enough. For sure<br>that is only the space for the bitmap and needs some additional space for the
<br>rest of the MD.<br><br>As far as I understood the following definitions in drbd/drbd_int.h: <br>- #define MD_GC_OFFSET 0<br>- #define MD_AL_OFFSET 8 // 8 Sectors after start of meta area<br>- #define MD_AL_MAX_SIZE 64 // = 32 kb LOG ~ 3776 extents ~ 14 GB Storage
<br>- #define MD_BM_OFFSET (MD_AL_OFFSET + MD_AL_MAX_SIZE) //Allows up to about 3.8TB<br><br>the rest of the MD would be (please correct me if I'm wrong):<br>- GC (means ?): 8 Sectors = 8*4096bit = 4KB<br>- AL ("Action Log"): 64 Sectors = 64*4096bit = 32KB
<br><br>so the MD would be 36KB plus the size of the bitmap?<br><br>I did some tests and adjusted the<br>#define MD_RESERVED_SIZE ( 128LU * (1<<10) ) // 128 MB ( in units of kb )<br>line in drbd/drbd_int.h to e.g
. (still more than enough):
<br>#define MD_RESERVED_SIZE ( 1LU * (1<<10) ) // 1 MB ( in units of kb )<br>
and experienced no unexpected behaviour while playing around with a newly <br>created partition.<br><br>So my question is - has anyone tried that before? Does anyone see any<br>problems when I use that in an working environment?
Do I have major bugs<br>in my calculations?<br><br>I tried to analyze the code to find something that forbids it but I didn't find<br>anything. I found a comment that I should use version 0.6 if I want to have<br>it for small devices but if it works like that I could use
0.7 until 0.8 (with dynamic<br>BM size?) will be released.<br><br>Some facts:<br>- I used drbd 0.7.16 for the tests.<br>- All my partitions will have the same size which will *never* be altered.<br>- When I tried with MD below the calculated size I experienced problems.
<br> (writes to the MD "killed" the filesystem since parts were overwritten)<br><br>Thanks for all comments<br>Martin