First, start heartbeat
1, start the main node of the heartbeat
After the heartbeat installation is completed, the boot footstep file heartbeat is automatically generated in the/ETC/INIT.D directory, and direct input/etc/init.d/heartbeat can see the use of the heartbeat script as follows:
[Root@node1 ~]#/etc/init.d/heartbeat
Usage:/etc/init.d/heartbeat {start|stop|status|restart|reload|force-reload}
The starting heartbeat can therefore be performed by the following command:
[Root@node1 ~] #service Heartbeat start
or through
[Root@node1 ~]#/etc/init.d/heartbeat start
This starts the heartbeat service for the master node
The log information is as follows:
Feb 5 19:09:48 node1 Heartbeat: [22768]: Info:glib:ucast:bound send socket to Device:eth0
Feb 5 19:09:48 node1 Heartbeat: [22768]: Info:glib:ucast:bound receive socket to Device:eth0
Feb 5 19:09:48 node1 Heartbeat: [22768]: info:glib:ucast:started on port 694 interface to Eth0
Feb 5 19:09:48 node1 Heartbeat: [22768]: info:glib:ping heartbeat.
Feb 5 19:09:48 node1 Heartbeat: [22768]: Info:glib:ping group Heartbeat started.
Feb 5 19:09:48 node1 Heartbeat: [22768]: info:local status now set to: ' Up '
Feb 5 19:09:49 node1 Heartbeat: [22768]: Info:link 192.168.12.1:192.168.12.1 up.
Feb 5 19:09:49 node1 Heartbeat: [22768]: Info:status Update for node 192.168.12.1:status Ping
Feb 5 19:09:49 node1 Heartbeat: [22768]: Info:link group1:group1 up.
Feb 5 19:09:49 node1 Heartbeat: [22768]: Info:status Update for node Group1:status Ping
This log is heartbeat in the initialization configuration, for example, heartbeat heartbeat interval, UDP broadcast port, ping node running status, etc., log information will be paused here, wait 120 seconds, Heartbeat will continue to output log, This 120-second is exactly the set time for the "initdead" option in HA.CF. The output information for this heartbeat is as follows:
Feb 5 19:11:48 node1 Heartbeat: [22768]: Warn:node Node2:is, dead
Feb 5 19:11:48 node1 Heartbeat: [22768]: info:comm_now_up (): Updating status to Active
Feb 5 19:11:48 node1 Heartbeat: [22768]: info:local status now set to: ' Active '
Feb 5 19:11:48 node1 Heartbeat: [22768]: info:starting child client "/usr/local/ha/lib/heartbeat/pingd-m 100-d 5s" (10 2,105)
Feb 5 19:11:49 node1 Heartbeat: [22768]: Warn:no stonith and Device configured.
Feb 5 19:11:49 node1 Heartbeat: [22768]: warn:shared disks not are.
Feb 5 19:11:49 node1 Heartbeat: [22768]: Info:resources being, acquired from Node2.
Feb 5 19:11:49 node1 Heartbeat: [22794]: info:starting "/usr/local/ha/lib/heartbeat/pingd-m 100-d 5s" as UID 102 GID (PID 22794)
In the above log, because Node2 has not yet started, so will give the "Node2:is dead" warning message, then started the Heartbeat plug-in pingd, because we in the HA.CF file does not configure Stonith, so the log also gives "no Stonith device Configured "warning prompt.