SOURCES: cman.init (NEW), cman.sysconfig (NEW) - added

aredridel aredridel at pld-linux.org
Thu Apr 5 06:07:27 CEST 2007


Author: aredridel                    Date: Thu Apr  5 04:07:27 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- added

---- Files affected:
SOURCES:
   cman.init (NONE -> 1.1)  (NEW), cman.sysconfig (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/cman.init
diff -u /dev/null SOURCES/cman.init:1.1
--- /dev/null	Thu Apr  5 06:07:27 2007
+++ SOURCES/cman.init	Thu Apr  5 06:07:22 2007
@@ -0,0 +1,64 @@
+#! /bin/sh
+#
+# cman        This starts and stops the CMAN cluster subsystems
+#
+# chkconfig: 345 60 19
+# description: CMAN Cluster subsystems
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Get Configuration variables
+[ -f  /etc/sysconfig/cman ] && . /etc/sysconfig/cman
+
+# Need a cluster name
+if [ -z "$CLUSTER_NAME" ]
+then
+  echo "Cluster services not started, no cluster name"
+  exit 1
+fi
+
+set -e
+
+case "$1" in
+    start)
+	echo -n $"Starting cluster services"
+	ccsd
+	sleep 1
+	modprobe cman
+	modprobe dlm
+	modprobe lock_harness
+	modprobe gfs
+	modprobe lock_dlm
+	cman_tool join -c $CLUSTER_NAME
+	fenced
+	clvmd
+	lvm vgchange -aly &
+	touch /var/lock/subsys/cman
+	echo
+        ;;
+
+    stop)
+	echo -n $"Stopping cluster services"
+	umount -a -tgfs
+	grep "blocked" /proc/cluster/status > /dev/null
+	[ $? = 1 ] && lvm vgchange -aln --ignorelockingfailure
+	killproc clvmd || true
+	killproc ccsd || true
+	fence_tool leave || true
+	sleep 3
+	cman_tool leave remove
+	rm -f /var/lock/subsys/cman
+	echo
+	;;
+
+    status)
+	cat /proc/cluster/status
+	;;
+    *)
+ 	echo "Usage cluster {start|stop|status}"
+	exit 1;
+	;;
+esac
+
+exit 0

================================================================
Index: SOURCES/cman.sysconfig
diff -u /dev/null SOURCES/cman.sysconfig:1.1
--- /dev/null	Thu Apr  5 06:07:27 2007
+++ SOURCES/cman.sysconfig	Thu Apr  5 06:07:22 2007
@@ -0,0 +1 @@
+# CLUSTER_NAME=cluster
================================================================


More information about the pld-cvs-commit mailing list