How it works...
We've made use of crm_mon before; it's an easy way to view the current status of all Pacemaker cluster resources. By starting this monitor on pg2, we can watch what happens when pg1 shuts down. Unfortunately, simple reboots are too safe. The server will call the Pacemaker shutdown script, which will cause it to migrate to pg2 like it did in the previous recipe.
By calling pkill with the -9 argument on the corosync service, Pacemaker can no longer interfere. The Linux kernel will end the corosync process, negating any safeguards that Pacemaker might try to impose when pg1 reboots. We should return to pg2 to watch the output of crm_mon while pg1 is offline.
The final result should look something like this:
Note that pg1 shows ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access