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: RHEL5 - [rgmanager] Add no_unmount to netfs.sh


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=705b1fc5472c69e09738149f4d95c9875971d76c
Commit:        705b1fc5472c69e09738149f4d95c9875971d76c
Parent:        70bc706890e89f6a51728e3c5b6f267fb0323acd
Author:        Mark Hlawatschek <hlawatschek@atix.de>
AuthorDate:    Fri Jan 9 14:19:53 2009 -0500
Committer:     Lon Hohberger <lhh@redhat.com>
CommitterDate: Fri Jan 9 14:19:53 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"
 


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