Closed twtlpla closed 9 months ago
I just wanted to let you know that your config is good. Setting your expectations right:
When the first path fails, DRBD needs to reconnect. When reconnecting, it will be able to establish only the second path.
Why does DRBD need to reestablish the complete DRBD connection? As TCP/IP is a stream-oriented (SOCK_STREAM) protocol, we do not know how much of the stream the receiver side got before the TCP/IP connection was aborted. Writing a "restart logic" is not worth the trouble.
That would be reasonably possible with a packet-oriented (SOCK_SEQPACKET) protocol.
From the introduction of load-balance-Paths, I think it realizes the fault tolerance and load balancing of drbd network. Below is my configuration file:
/etc/drbd.d/drbd1.res: resource drbd1 { connection { path { host ha-155 address 192.168.122.65:7789; host ha-156 address 192.168.122.66:7789; } path { host ha-155 address 192.168.122.155:7789; host ha-156 address 192.168.122.156:7789; } } on ha-155 { device /dev/drbd1; disk /dev/sdb; meta-disk internal; node-id 1; } on ha-156 { device /dev/drbd1; disk /dev/sdb; meta-disk internal; node-id 2; } } /etc/drbd.d/global_common.conf net { load-balance-paths yes; }
After two network paths are created, run the "drbdsetup events2 --now" command to find that the two paths are connected.
After the second network is disconnected, run the "drbdsetup events2 --now" command to find that the two paths are still connected.
After the first network is disconnected, "run the drbdsetup events2 --now" command to find that both paths are disconnected.
According to my understanding, disconnect one of the networks and keep the other one connected, but the result is not so.
What's my problem? Do you have any suggestions?