]> git.proxmox.com Git - pve-storage.git/commitdiff
drbd: set allow-two-primaries=yes
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 17 Jun 2015 06:57:32 +0000 (08:57 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 17 Jun 2015 06:57:32 +0000 (08:57 +0200)
So that we can do live migrations.

PVE/Storage/DRBDPlugin.pm

index 0179ad859cc7f8a0727b2dac028a1458e141da86..ca800368b98c44a20563ea3ce444815ace933e6b 100644 (file)
@@ -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]);