> As far as I can tell set_drbdsetup_props() looks okay. The problem is that we
> are not able to reproduce your problem. In a drbdmanage environment[1]
> everything looks fine, both nodes are able to switch the resource to primary
> (tested with 'drbdadm primary' on both sides)...
> 
> Is it reproducible? Even if you start from scratch (drbdmanage unit)?

Yes, I can reproduce it reliable. But I use 3-nodes ($redundance=3)

I can get it working by introducing a sleep(5) 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]);

    sleep(5); # else we get split brain?!
    
    ($rc, $res) = $hdl->set_drbdsetup_props(
        { 
            target => "resource",
            resource => $name,
            type => 'neto',
            'allow-two-primaries' => 'yes',
        });
    check_drbd_rc($rc->[0]);
--------------------

_______________________________________________
drbd-user mailing list
[email protected]
http://lists.linbit.com/mailman/listinfo/drbd-user

Reply via email to