Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
I have still problems with live migration.
First, it works now if if set:
# drbdmanage net-options --allow-two-primaries yes --common
But I thought it would be better to do it directly on the resource, so
I tried:
# drbdmanage net-options --allow-two-primaries yes --resource vm-100-disk-1
That also worked, so I tried to implement that inside the pve storage library.
I call set_drbdsetup_props() directly after auto_deploy:
------------
my ($rc, $res) = $hdl->create_resource($name, {});
check_drbd_rc($rc->[0]);
($rc, $res) = $hdl->create_volume($name, $size, {});
check_drbd_rc($rc->[0]);
my $redundancy = get_redundancy($scfg);;
($rc, $res) = $hdl->auto_deploy($name, $redundancy, 0, 0);
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]);
-----------
That seems to work, but I end up with _standalone connections:
# drbdsetup show
resource vm-100-disk-2 {
_this_host {
node-id 1;
volume 0 {
device minor 11;
disk "/dev/drbdpool/vm-100-disk-2_00";
meta-disk internal;
disk {
size 2097152s; # bytes
}
}
}
connection {
_peer_node_id 0;
_this_host ipv4 192.168.3.202:7701;
_remote_host ipv4 192.168.3.201:7701;
_is_standalone;
net {
allow-two-primaries yes;
cram-hmac-alg "sha1";
shared-secret "P28WJbG+4LnDRuMudukx";
_name "hatest1";
}
}
connection {
_peer_node_id 2;
_this_host ipv4 192.168.3.202:7701;
_remote_host ipv4 192.168.3.203:7701;
_is_standalone;
net {
allow-two-primaries yes;
cram-hmac-alg "sha1";
shared-secret "P28WJbG+4LnDRuMudukx";
_name "hatest3";
}
}
}
Why? How do I correctly set allow-two-primaries on resources?