[DRBD-user] Doc change for resizing guide

Trevor Hemsley themsley at voiceflex.com
Wed Oct 31 13:13:26 CET 2012

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

Hi all

Last night I had occasion to resize one of my DRBD devices from 32GB to
17GB and used the guide http://www.drbd.org/users-guide/s-resizing.html
to do an offline resize. In doing so, I found that I would consistently
get an error message

confused in meta_restore_md:TK_NUM: expected to write 131072 bytes,
actually wrote 77824

The page is good but seems to lack some detail about how you calculate
la-size-sect and also is missing some information about the bm {}
section which seems to also need to be changed. I found that
la-size-sect can be calculated by taking the bm_offset from the output
of the drbdadm create-md and dividing it by 512 to get the number of
sectors involved. This is for internal metadata only, I don't use
external so the procedure may be different for that.

What's not documented at all, is that on a resize of the device
downwards, you also need to adjust the section that says e.g.

bm {
   # at 0kB
    131068 times 0x0000000000000000;

so that the number on the front (131068) reflects the new size of the
metadata which can be calculated by taking the new la-size-sect/512 - so
in my case bm_offset was 18466918400 and la-size-sect ends up as
36068200 and the bm "times" number ends up as 70445.x and rounded up is

My devices are now both resized and up and running and seem to be
working but if I got anything wrong then perhaps someone can correct me
before google eats this mail and serves up incorrect information to
anyone looking for the "confused" message above.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20121031/03fccc84/attachment.htm>

More information about the drbd-user mailing list