[SCM] CTDB repository - branch master updated -
13d3eb9a8bc7fad14fcd3e7e023c1336657424d6
Ronnie Sahlberg
sahlberg at samba.org
Mon May 12 06:48:34 GMT 2008
The branch, master has been updated
via 13d3eb9a8bc7fad14fcd3e7e023c1336657424d6 (commit)
from 8d6ecf47318188448d934ab76e40da7e4cece67d (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 13d3eb9a8bc7fad14fcd3e7e023c1336657424d6
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Mon May 12 16:44:33 2008 +1000
When we run the init script to start the ctdb service
Use tdbdump to verify that all persistent database files are good
before we start the daemon.
-----------------------------------------------------------------------
Summary of changes:
config/ctdb.init | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
Changeset truncated at 500 lines:
diff --git a/config/ctdb.init b/config/ctdb.init
index 922a53d..95845d1 100755
--- a/config/ctdb.init
+++ b/config/ctdb.init
@@ -85,6 +85,19 @@ fi
start() {
killall -q ctdbd
echo -n $"Starting ctdbd service: "
+
+ # check all persistent databases that they look ok
+ PERSISTENT_DB_DIR="/var/ctdb/persistent"
+ [ -z "$CTDB_DBDIR" ] || {
+ PERSISTENT_DB_DIR="$CTDB_DBDIR/persistent"
+ }
+ for PDBASE in `ls $PERSISTENT_DB_DIR/*.tdb.[0-9]`; do
+ /usr/bin/tdbdump $PDBASE >/dev/null 2>/dev/null || {
+ echo "Persistent database $PDBASE is corrupted! CTDB will not start."
+ return 1
+ }
+ done
+
case $init_style in
suse)
startproc /usr/sbin/ctdbd $CTDB_OPTIONS
--
CTDB repository
More information about the samba-cvs
mailing list