#2634 Issue closed: DRBD9 restore issue, when trying to become primary

Labels: enhancement, fixed / solved / done

dragon299 opened issue at 2021-06-22 06:43:

  • ReaR version ("/usr/sbin/rear -V"): Relax-and-Recover 2.4 / Git

  • OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"): Red Hat Enterprise Linux release 8.3 (Ootpa)

  • Issue
    With DRBD9 there is a new behavior when trying to become primary, without the second node reachable. The command "drbadm -- --overwrite-data-of-peer primary $resource" will end with an error "refusing to be primary while peer is not outdated".

  • Workaround:
    Edit "/usr/share/rear/layout/prepare/GNU/Linux/150_include_drbd_code.sh" line 30:
    Old:

drbdadm -- --overwrite-data-of-peer primary $resource

New:

drbdadm del-peer $resource
drbdadm primary $resource --force

jsmeix commented at 2021-06-22 12:42:

@dragon299
thank you for the descriptive issue report
and in particular for your workaround.

I have zero personal experience with DRBD
so I cannot reproduce or test anything here.

Based on your descriptive report
I tried to implement your workaround
as some kind of dirty hack via
https://github.com/rear/rear/pull/2636

Please have a look at
https://github.com/rear/rear/pull/2636
and test it and provide feedback if the changes therein
make things work for you in your particular environment.

See the section
"Testing current ReaR upstream GitHub master code" in
https://en.opensuse.org/SDB:Disaster_Recovery

dragon299 commented at 2021-06-24 12:24:

@jsmeix
thank you for your fast support. I tested your patch and it does work perfectly on our system.

jsmeix commented at 2021-06-24 12:57:

@dragon299
thank you for testing it and for your feedback!

I merged https://github.com/rear/rear/pull/2636
so this issue should be avoided.


[Export of Github issue for rear/rear.]