Increasing Maximum al-extents via metadata enlargement

This article will explain how you can increase the maximum al-extents setting by enlarging DRBD's metadata. This is useful if you're seeing congestion-extents messages in your logs.

WARNING: It is strongly suggested you backup your data before this procedure.

This example will use a stacked device, but can easily be adapted to non-stacked DRBD® configurations.

Online al-extents resize

On the Primary:

# Take a backup :)
drbdadm suspend-io <upper-res> -S
drbdadm suspend-io <lower-res>
lvextend -l+1 <backing-vg>/<backing-lv>
drbdsetup resize 0 --al-stripe-size=1M

On the Secondary:

lvextend -l+1 <backing-vg>/<backing-lv>
drbdsetup resize 0 --al-stripe-size=1M

On the Primary:

drbdadm resume-io <lower-res>
drbdsetup resize 10 --al-stripe-size=1M

On the DR:

lvextend -l+1 <backing-vg>/<backing-lv>
drbdsetup resize 10 --al-stripe-size=1M

On the Primary:

drbdadm resume-io <upper-res> -S

Offline al-extents resize

There may be a reason where you want to do this offline. You really cannot, but you can wipe and re-create the metadata with the proper desired stripe-size. Naturally this will require a full sync.

On both nodes:

drbdadm down r0
drbdadm wipe-md r0
lvextend -l+1 /dev/vg_drbd/lv_r0
drbdmeta 0 v08 /dev/vg_drbd/lv_r0 internal create-md --al-stripe-size-kB 1024

Results

This will let you take al-extents up to 65534 (65449 is closest prime) from it's original/default maximum value of 6433.

Don't forget to adjust congestion-extents accordingly if you're using DRBD Proxy (52541 is ~80% of 65449).

Edited 2021/12/14 – DJV