
我建立了一個高可用性系統心跳,我希望當主叢集出現故障並且輔助叢集被啟動時,Heartbeat 在其中啟動並執行 shell 腳本。
內容
/etc/ha.d/haresources
master IPaddr::10.0.0.1/24 test.sh
內容
/etc/ha.d/ha.cf
autojoin none debugfile /var/log/ha-debug logfile /var/log/ha-log logfacility local0 ucast ens32 10.0.0.3 ucast ens32 10.0.0.2 udpport 694 use_logd yes keepalive 1 deadtime 10 warntime 5 initdead 20 node master node slave auto_failback on
我給了腳本執行權限並將其放在路徑中/etc/init.d/
,但我仍然無法透過Heartbeat執行它,這種類型的過程可能嗎?