From 07af07cc16b3dafb5d44cd5db485f212cd8ab2c5 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 17 Jun 2015 08:57:32 +0200 Subject: [PATCH] drbd: set allow-two-primaries=yes So that we can do live migrations. --- PVE/Storage/DRBDPlugin.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/PVE/Storage/DRBDPlugin.pm b/PVE/Storage/DRBDPlugin.pm index 0179ad8..ca80036 100644 --- a/PVE/Storage/DRBDPlugin.pm +++ b/PVE/Storage/DRBDPlugin.pm @@ -180,6 +180,15 @@ sub alloc_image { my ($rc, $res) = $hdl->create_resource($name, {}); check_drbd_rc($rc->[0]); + ($rc, $res) = $hdl->set_drbdsetup_props( + { + target => "resource", + resource => $name, + type => 'neto', + 'allow-two-primaries' => 'yes', + }); + check_drbd_rc($rc->[0]); + ($rc, $res) = $hdl->create_volume($name, $size, {}); check_drbd_rc($rc->[0]);