cluster: RHEL53 - [rgmanager] Add no_unmount to netfs.sh

Lon Hohberger lon@fedoraproject.org
Mon Jan 12 21:31:00 GMT 2009


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=45233b3ef5f8167ff44bc51c57eb1e289d8216e4
Commit:        45233b3ef5f8167ff44bc51c57eb1e289d8216e4
Parent:        a7f534e93cf4297901e5a5893ef932b547f96b67
Author:        Mark Hlawatschek <hlawatschek@atix.de>
AuthorDate:    Fri Jan 9 14:19:53 2009 -0500
Committer:     Lon Hohberger <lhh@redhat.com>
CommitterDate: Mon Jan 12 16:30:05 2009 -0500

[rgmanager] Add no_unmount to netfs.sh

---
 rgmanager/src/resources/netfs.sh |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/rgmanager/src/resources/netfs.sh b/rgmanager/src/resources/netfs.sh
index d7d63f5..bd391b6 100755
--- a/rgmanager/src/resources/netfs.sh
+++ b/rgmanager/src/resources/netfs.sh
@@ -107,6 +107,16 @@ meta_data()
 	    <content type="string"/>
         </parameter>
 
+        <parameter name="no_unmount" required="0">
+	    <longdesc lang="en">
+	    	Do not unmount the filesystem during a stop or relocation operation
+	    </longdesc>
+            <shortdesc lang="en">
+	    	Skip unmount opration
+            </shortdesc>
+	    <content type="boolean"/>
+        </parameter>
+
         <parameter name="force_unmount">
             <longdesc lang="en">
                 If set, the cluster will kill all processes using 
@@ -573,6 +583,7 @@ stopNFSFilesystem() {
 	typeset -i sleep_time=2		# time between each umount failure
 	typeset done=""
 	typeset umount_failed=""
+	typeset no_umount=""
 	typeset force_umount=""
 	typeset fstype=""
 
@@ -625,6 +636,17 @@ stopNFSFilesystem() {
 		return $FAIL
 		;;
 	$YES)
+		case ${OCF_RESKEY_no_unmount} in
+                $YES_STR)       no_umount="$YES" ;;
+                1)              no_umount="$YES" ;;
+                *)              no_umount="" ;;
+                esac
+		
+		if [ "$no_umount" ]; then
+				ocf_log info "skipping unmount operation of $mp"
+				return $SUCCESS
+		fi
+
 		sync; sync; sync
                         ocf_log info "unmounting $mp"
 



More information about the Cluster-cvs mailing list