BenV's notes

Xen 4.2.0 and DRBD

by on Nov.21, 2012, under Software

Now that Xen has deprecated the xm command and xend daemon, libxl is the way to go. However, libxl didn’t support external scripts for your block devices (like block-drbd) before version 4.2.0. Seems like that issue has been resolved, or at least as far as I care for now. However, with these changes I found that the block-drbd script (at least up until DRBD 8.4.2) still doesn’t work properly.

To save you some time debugging this shit, the problem is that the new xl stack forces the device type to be ‘phy‘ when a script is used. In the older versions xm/xend would report ‘drbd‘ to the block-drbd script as device type. Knowing this the fix for now is simple:

--- block-drbd.org 2012-11-21 12:35:08.338180920 +0100
+++ block-drbd 2012-11-21 12:35:33.278642801 +0100
@@ -248,6 +248,8 @@
fi

case $t in
+ phy)
+ ;&
drbd)
drbd_resource=$p
drbd_role="$(/sbin/drbdadm role $drbd_resource)"
@@ -276,6 +278,8 @@

remove)
case $t in
+ phy)
+ ;&
drbd)
p=$(xenstore_read "$XENBUS_PATH/params")
drbd_resource=$p




:,

1 Comment for this entry

Leave a Reply

You must be logged in to post a comment.

Archives

  • 2018 (1)
  • 2016 (1)
  • 2015 (7)
  • 2014 (4)
  • 2013 (11)
  • 2012 (27)
  • 2011 (26)
  • 2010 (25)
  • 2009 (68)