DRBD tip

January 13th, 2011 by dan

I’ve been experimenting with DRBD, which looks great.

One thing confused me though: Resizing a DRBD device.

If the instructions on http://www.drbd.org/users-guide/s-resizing.html#s-growing-online are not working for you, and you get messages like this:

[ 1578.883204] block drbd0: Requested disk size is too big (19922944 > 10383360)

Try a reboot! The backing block device size as reported to DRBD may not update if you resize the backing device using LVM2.
For what it’s worth, this is the procedure I have now got for resizing a DRBD device. Obviously replace device names, sizes shown as appropriate.
  1. pvcreate /dev/sdb2
  2. vgextend drbdvg /dev/sdb2
  3. lvextend -L +11G /dev/drbdvg/lvol0 /dev/sdb2
  4. reboot!
  5. On boot, DRBD appeared to automagically resize my DRBD device:  [    8.342750] block drbd0: drbd_bm_resize called with capacity == 20766720
  6. Wait for sync to complete
  7. Resize the filesystem you have on your DRBD device, using e.g: resize2fs.
That is all.

I’m going to a Meetup with Mak…

November 25th, 2010 by dan

I’m going to a Meetup with Makespace (Cambridge, UK)! http://meetu.ps/4tbB

RT @mbedmicro Had a great time…

November 20th, 2010 by dan

RT @mbedmicro Had a great time running an mbed workshop at Elektor Live in Eindhoven. Hope you all enjoyed it! http://bit.ly/bsRM4l

Twitter Weekly Updates for 2010-10-24

October 24th, 2010 by dan

Powered by Twitter Tools.

django-rosetta is rather ace f…

October 22nd, 2010 by dan

django-rosetta is rather ace for translations http://code.google.com/p/django-rosetta/

@lewisking nice- how did you g…

October 16th, 2010 by dan

@lewisking nice- how did you get the effect?

@small_twitting hello!

October 16th, 2010 by dan

@small_twitting hello!

Great evening at the cambridge…

October 14th, 2010 by dan

Great evening at the cambridge #makespace meetup - thanks to all present.

#fowa most awesome tshirt eve…

October 5th, 2010 by dan

#fowa most awesome tshirt ever. uncomfortable juxtaposition with trilby wearing Carson?

@n_sonic Indeed. We don’t whoo…

October 4th, 2010 by dan

@n_sonic Indeed. We don’t whoop, we’re British. #fowa