- added
authoraredridel <aredridel@pld-linux.org>
Thu, 5 Apr 2007 04:07:22 +0000 (04:07 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cman.init -> 1.1
    cman.sysconfig -> 1.1

cman.init [new file with mode: 0644]
cman.sysconfig [new file with mode: 0644]

diff --git a/cman.init b/cman.init
new file mode 100644 (file)
index 0000000..fcbee68
--- /dev/null
+++ b/cman.init
@@ -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
diff --git a/cman.sysconfig b/cman.sysconfig
new file mode 100644 (file)
index 0000000..9b95678
--- /dev/null
@@ -0,0 +1 @@
+# CLUSTER_NAME=cluster
This page took 0.072128 seconds and 4 git commands to generate.