From mboxrd@z Thu Jan 1 00:00:00 1970 From: lhh@sourceware.org Date: 13 Nov 2007 17:38:02 -0000 Subject: [Cluster-devel] cluster/rgmanager/src/resources clusterfs.sh Message-ID: <20071113173802.28111.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: cluster Branch: RHEL5 Changes by: lhh at 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 @@ + + + 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. + + + Seppuku Unmount + + + + 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