This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=09311620ae2854105f2edea2e07ea1f663efc50b
Commit:        09311620ae2854105f2edea2e07ea1f663efc50b
Parent:        9a3d7769bb6bb88c8ff3d732faba28eb67251cee
Author:        Mark Hlawatschek <hlawatschek@atix.de>
AuthorDate:    Fri Jan 9 14:19:53 2009 -0500
Committer:     Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Tue Jan 13 05:49:50 2009 +0100

[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 e6b0296..24b89ec 100644
--- a/rgmanager/src/resources/netfs.sh
+++ b/rgmanager/src/resources/netfs.sh
@@ -87,6 +87,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 
@@ -553,6 +563,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=""
 
@@ -605,6 +616,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"
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]