This repository has been archived by the owner on Nov 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# | ||
auth 1 | ||
1 md5 abcefghijklmnopqrstuvwxyz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# | ||
logfile /var/log/ha.log | ||
keepalive 2 | ||
deadtime 10 | ||
warntime 5 | ||
initdead 20 | ||
udpport 694 | ||
auto_failback off | ||
ucast eth1 192.168.50.102 | ||
node db-drbd-1 | ||
node db-drbd-2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# | ||
db-drbd-1 MailTo::me+drbdfailover@gmail.com::HeartbeatFailover_db-drbd-float drbddisk::r0 Filesystem::/dev/drbd0::/srv::ext4::noatime,nodiratime mysql 192.168.50.103 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
# | ||
# This script is inteded to be used as resource script by heartbeat | ||
# | ||
# Mar 2006 by Monty Taylor | ||
# | ||
### | ||
|
||
. /etc/ha.d/shellfuncs | ||
|
||
case "$1" in | ||
start) | ||
res=`/etc/init.d/mysql start` | ||
ret=$? | ||
ha_log $res | ||
exit $ret | ||
;; | ||
stop) | ||
res=`/etc/init.d/mysql stop` | ||
ret=$? | ||
ha_log $res | ||
exit $ret | ||
;; | ||
status) | ||
if [[ `ps -ef | grep '[m]ysqld'` > 1 ]] ; then | ||
echo "running" | ||
else | ||
echo "stopped" | ||
fi | ||
;; | ||
*) | ||
echo "Usage: mysql {start|stop|status}" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
exit 0 |