[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/rgmanager/src/resources clusterfs.sh



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	lhh sourceware org	2007-11-13 17:38:02

Modified files:
	rgmanager/src/resources: clusterfs.sh 

Log message:
	Add self_fence support to RHEL5 branch for clusterfs

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/clusterfs.sh.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.15.2.2&r2=1.15.2.3

--- cluster/rgmanager/src/resources/clusterfs.sh	2007/05/21 15:57:29	1.15.2.2
+++ cluster/rgmanager/src/resources/clusterfs.sh	2007/11/13 17:38:02	1.15.2.3
@@ -133,6 +133,18 @@
 	    <content type="string"/>
         </parameter>
 
+	<parameter name="self_fence">
+	    <longdesc lang="en">
+	        If set and unmounting the file system fails, the node will
+		immediately reboot.  Generally, this is used in conjunction
+		with force-unmount support, but it is not required.
+	    </longdesc>
+	    <shortdesc lang="en">
+	        Seppuku Unmount
+	    </shortdesc>
+	    <content type="boolean"/>
+	</parameter>
+
 	<parameter name="fsid">
 	    <longdesc lang="en">
 	    	File system ID for NFS exports.  This can be overridden
@@ -795,6 +807,15 @@
 		esac
 	fi
 
+	if [ -n "$mp" ]; then
+		case ${OCF_RESKEY_self_fence} in
+	        $YES_STR)	self_fence=$YES ;;
+		1)		self_fence=$YES ;;
+	        *)		self_fence="" ;;
+		esac
+	fi
+
+
 	#
 	# Always do this hackery on clustered file systems.
 	#
@@ -870,8 +891,13 @@
 	done # while 
 
 	if [ -n "$umount_failed" ]; then
-		ocf_log err "'umount $dev' failed ($mp), error=$ret_val"
+		ocf_log err "'umount $mp' failed, error=$ret_val"
 
+		if [ "$self_fence" ]; then
+			ocf_log alert "umount failed - REBOOTING"
+			sync
+			reboot -fn
+		fi
 		return $FAIL
 	fi
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]