Resizing a DRBD Resource Built On A LVM

Mattias Geniar, Monday, February 14, 2011 - last modified: Sunday, May 13, 2012

This is far easier than it sounds. First, make sure you increase the LVM volume on which you've built your DRBD system. For more information on how to do so, please have a look at the 'Increase a VMware Disk formatted as LVM' article I wrote a while back. Follow those steps, just until you get to the resize2fs part. Don't run that (yet).

Now, determine your master DRBD node.

root@srv ~]# cat /proc/drbd 
0: cs:Connected st:Primary/Secondary ds:UpToDate/UpToDate C r---
ns:329 nr:328 dw:657 dr:383 al:2 bm:2 lo:0 pe:0 ua:0 ap:0 oos:0

It should contain the term 'Primary' as first item in the st: block (which indicates the state).

When on the primary node, browse to the excellent 'Resizing resources' manual from DRBD to determine your approach. It's dependant on having internal or external metadata for your resource, and whether you can do an online resize or not.

Hi! My name is Mattias Geniar. I'm a Support Manager at Nucleus Hosting in Belgium, a general web geek & public speaker. Currently working on DNS Spy & Oh Dear!. Follow me on Twitter as @mattiasgeniar.

Share this post

Did you like this post? Will you help me share it on social media? Thanks!


Leave a Reply

Your email address will not be published. Required fields are marked *