[SOLVED] I'm struggle with failback in Ceph rbd-mirror.

Hi there
I'm sorry if this topic aready appears here, but I cam looking for possible solution with my trouble.
I followed the Proxmox wiki regarding CEPH rbd-mirror.[0]
It's a 3-node Proxmox VE and Ceph, created with virtual machine over virt-manager. It's just a lab.
So, let's named this 3-node as CLUSTER100.
The other side, the backup side, it's single node, but with an actived cluster and ceph installed. Let's named CLUSTER200.
All hosts are in the same network:
- Management access: vmbr0 -> 192.168.122.0/24
- Cluster: nic1 -> 172.16.100.0/24
- Migrate: nic2 -> 172.16.110.0/24
- CEPH-NET: nic3 -> 172.19.150.0/24
- CEPH-OSD: nic4 -> 172.19.250.0/24

Everything went fine.
I was enabled to create the snapshot task with a interval of 5 minutes between the hosts.
So, I simulated a failover, by shuting down the vm on the CLUSTER100, the "production" side.
I shut down the vm in CLUSTER100 and did:
Code:
rbd mirror image demote VMS/vm-101-disk-0
On the other side, in the CLUSTER200, I did:
Code:
rbd mirror image promote VMS/vm-101-disk-0
So far so good.
I was able to started up the vm normaly.
Did some changes and so on... So far so good.
In order to do the failback, I shut down the vm on CLUSTER200, the backup side.
And I did:
Code:
rbd mirror image demote VMS/vm-101-disk-0

Now, here is the problem:
No matter if I do
Code:
rbd mirror image promote VMS/vm-101-disk-0
on CLUSTER100, and then

Code:
rbd mirror image resync VMS/vm-101-disk-0

on CLUSTER200 or CLUSTER100.

When I promote the vm disk on the CLUSTER100, I got a split-brain scenario.
Sometime I was able to "solve" the split-brain thing with resync in the CLUSTER200, but then the disk on that side disappears and after some minutes, the disk appears again, because the mirror is back to work.
But for my surprise, when I turned on the vm on CLUSTER100, every thing I did on the vm while it's was on the other side (CLUSTER200) has gone!
I can't live with that.
Perhaps, it's my fault.
Perhaps I am doing something very wrong.

I need help to better understand how to do the failback.

Any assistance with be welcome.

Thanks







[0] https://pve.proxmox.com/wiki/Ceph_RBD_Mirroring
 
Last edited:
Is your mirror bidirectional?
Thanks for the reply.
I think not

pve01:~# rbd mirror pool info VMS
Mode: image
Site Name: 7b50800f-4c5b-49de-8359-4168470e9044
Mirror UUID: 2e5f8d8a-173a-4dad-81ce-ef9182030394
Remote Namespace:

Peer Sites:

UUID: 7705efc1-f51b-4daa-b90e-56222d1232df
Name: 3ccc5352-c281-49da-b8b9-d210d0601488
Mirror UUID: f4e5541c-8184-4764-92e2-7d2555a4f6e5
Direction: tx-only

pve-bkp:~# rbd mirror pool info VMS
Mode: image
Site Name: 3ccc5352-c281-49da-b8b9-d210d0601488
Mirror UUID: f4e5541c-8184-4764-92e2-7d2555a4f6e5
Remote Namespace:

Peer Sites:

UUID: 5c2359f0-4af3-4df8-910c-45208abd71f5
Name: cluster100
Mirror UUID:
Direction: rx-tx
Client: client.rbd-mirror-peer-cluster100
 
Well... After some deep digging and with the Claude help I fix the issue.
Turns out that the original problem had two causes, and both are now fixed:
  1. No rbd-mirror daemon on CLUSTER100. It wasn't pulling anything from CLUSTER200, so pve01 was left with the old image. There is now an active daemon (using the --setuser root change from the wiki).
  2. Peer set to tx-only, and later with the wrong user. pve01 only sent data and never received any. Now the peer is rx-tx on both sides, with the correct user name (client.rbd-mirror-peer).
I never enabled the two-way mirroring... So, no wonder why is not working...
Now everything is fine.
Thanks