I am currently working with a cluster configured with DRBD, Pacemaker, and Corosync on a CentOS7 operating system. I am wondering if there are any precautions or specific steps that I should be aware of when executing the ‘systemctl restart network’ command.
Any advice or best practices from your experiences would be greatly appreciated.
“Don’t do that”, ideally. Once the cluster is setup you really shouldn’t be making networking config changes that require restarting the networking. Doing so can trigger split-brains without stonith, or cause Pacemaker to trigger stonith.
Now if you absolutely need to restart networking, then I would first set the cluster into maintenance-mode. This will disable it from triggering fencing, or moving any resources when the network is interrupted. Additionally, you’ll want to disconnect DRBD manually beforehand. You do this via a drbdadm disconnect <res_name>. DRBD will recognize the difference between a graceful disconnect triggered by an administrative command Vs. the networking just unexpectedly going away. Once complete, remove the cluster from maintenance-mode and connect the DRBD resources again.
Alternatively, if you’re just making quick changes that need not be persistent, you could always just trying altering the network using using the lower level ipadd2 utilities.
Please note the above assumes you’re not making any changes to the interfaces used by DRBD or Corosync. If that is the case you’ll need to stop everything, edit the configurations, etc, and then restart services.
Thank you very much for your detailed advice and guidance. It has deepened my understanding of the issue.
In particular, your explanation about the procedure when a network restart is necessary was very beneficial. I understood the importance of setting the cluster to maintenance mode and manually disconnecting DRBD. I will also take note of the premise that no changes are made to the interfaces used by DRBD or Corosync.
Your advice will be a reference for me as I proceed with my work. Once again, I deeply appreciate your time and support.