[DRBD-user] Small meta device?

Lars Ellenberg Lars.Ellenberg at linbit.com
Sat Mar 4 15:57:02 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.


/ 2006-03-04 14:30:08 +0000
\ Casey Allen Shobe:
> On Saturday 04 March 2006 13:32, Casey Allen Shobe wrote:
> > > Is there a way I can reduce the size of the meta disk in drbd.conf?
> 
> Dug through the archives, and found that the despairing answer is apparently 
> 'no', so I've repartitioned things to 200mb to workaround the problem. :/

there are two ways:
  there is a define, which you have to find yourself, and that you can
  reduce, so there will be smaller meta data area, and smaller possible
  storage area. but it is untested whether things do work when you
  redefine it, and if somehow you will ever connect one of your nodes to a
  "standard", unpached, drbd, (by accident, or because you forgot to patch
  some later version upgrade) , Bad Things Will Happen.

the other way is to cheat on the device level:

  man dmsetup

  # create one MB real storage, and 127 MB unreal
  real_MB=3
  real_sectors=$[real_MB * 2048]
  fake_sectors=$[128*2048 - real_sectors]
  
  dmsetup create drbd0-md <<___
  0 $real_sectors linear /dev/hdXN 0
  $real_sectors $fake_sectors error
  ___

  and then tell drbd: meta-disk /dev/mapper/drbd0-md[0];

  be careful when calculating the sizes and offsets, and what real devices
  you want to reference, and be careful when writing the necessary init
  scripts. other than that, it will just work.

-- 
: Lars Ellenberg                                  Tel +43-1-8178292-0  :
: LINBIT Information Technologies GmbH            Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe   http://www.linbit.com :
__
please use the "List-Reply" function of your email client.



More information about the drbd-user mailing list