All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] cluster/rgmanager/src/resources fs.sh
@ 2007-02-13 15:55 lhh
  0 siblings, 0 replies; 8+ messages in thread
From: lhh @ 2007-02-13 15:55 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	lhh at sourceware.org	2007-02-13 15:55:15

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

Log message:
	Apply fixes from RHEL4 branch

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

--- cluster/rgmanager/src/resources/fs.sh	2006/12/14 22:17:43	1.17.2.1
+++ cluster/rgmanager/src/resources/fs.sh	2007/02/13 15:55:14	1.17.2.2
@@ -320,7 +320,7 @@
 	[ -z "$OCF_RESKEY_fstype" ] && return 0
 
 	case $OCF_RESKEY_fstype in
-	ext2|ext3|jfs|xfs|reiserfs|vfat|tmpfs)
+	ext2|ext3|jfs|xfs|reiserfs|vfat|tmpfs|vxfs)
 		return 0
 		;;
 	*)
@@ -544,8 +544,8 @@
 			# place
 			#
 			if [ -n "$tmp_mp"  -a "$tmp_mp"  != "$mp" ]; then
-				ocf_log warn "\
-Device $dev is mounted on $tmp_mp instead of $mp"
+				ocf_log warn \
+"Device $dev is mounted on $tmp_mp instead of $mp"
 			fi
 			return $YES
 		fi
@@ -802,6 +802,7 @@
 enable_fs_quotas()
 {
 	declare -i need_check=0
+	declare -i rv
 	declare quotaopts=""
 	declare mopt
 	declare opts=$1
@@ -849,8 +850,13 @@
 	ocf_log info "Enabling Quotas on $mp"
 	ocf_log debug "quotaon -$quotaopts $mp"
 	quotaon -$quotaopts $mp
+	rv=$?
+	if [ $rv -ne 0 ]; then
+		# Just a warning
+		ocf_log warn "Unable to turn on quotas for $mp; return = $rv"
+	fi
 
-	return $?
+	return $rv
 }
 
 
@@ -872,14 +878,14 @@
 	mp=${OCF_RESKEY_mountpoint}
 	case "$mp" in 
       	""|"[ 	]*")		# nothing to mount
-    		return $SUCCESS
+    		return $OCF_SUCCESS
     		;;
 	/*)			# found it
 	  	;;
 	*)	 		# invalid format
 			ocf_log err \
 "startFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
-	    	return $FAIL
+	    	return $OCF_ERR_ARGS
 	    	;;
 	esac
 	
@@ -890,7 +896,7 @@
 	if [ -z "$dev" ]; then
 			ocf_log err "\
 startFilesystem: Could not match $OCF_RESKEY_device with a real device"
-			return $FAIL
+			return $OCF_ERR_ARGS
 	fi
 
 	#
@@ -900,7 +906,7 @@
 		if ! [ -d "$mp" ]; then
 			ocf_log err"\
 startFilesystem: Mount point $mp exists but is not a directory"
-			return $FAIL
+			return $OCF_ERR_ARGS
 		fi
 	else
 		ocf_log err "\
@@ -929,7 +935,7 @@
 	case $? in
 	$YES)		# already mounted
 		ocf_log debug "$dev already mounted"
-		return $SUCCESS
+		return $OCF_SUCCESS
 		;;
 	$NO)		# not mounted, continue
 		;;
@@ -1076,7 +1082,8 @@
 	typeset -i ret_val=0
 	typeset -i try=1
 	typeset -i max_tries=3		# how many times to try umount
-	typeset -i sleep_time=2		# time between each umount failure
+	typeset -i sleep_time=5		# time between each umount failure
+	typeset -i nfslock_reclaim=0
 	typeset done=""
 	typeset umount_failed=""
 	typeset force_umount=""
@@ -1168,14 +1175,12 @@
 				     [ "$OCF_RESKEY_nfslock" = "1" ]; then
 				    ocf_log warning \
 					"Dropping node-wide NFS locks"
+				    pkill -KILL -x lockd
 	          		    mkdir -p $mp/.clumanager/statd
 				    # Copy out the notify list; our 
 				    # IPs are already torn down
-				    if notify_list_store $mp/.clumanager/statd
-				    then
-				      notify_list_broadcast \
-				        $mp/.clumanager/statd
-				    fi
+				    notify_list_store $mp/.clumanager/statd
+				    nfslock_reclaim=1
 				  fi
 				fi
 			fi
@@ -1200,6 +1205,11 @@
 		fi
 	done # while 
 
+	if [ $nfslock_reclaim -eq 1 ]; then
+		# If we have this flag set, do a full reclaim broadcast
+		notify_list_broadcast $mp/.clumanager/statd
+	fi
+
 	if [ -n "$umount_failed" ]; then
 		ocf_log err "'umount $mp' failed, error=$ret_val"
 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/resources fs.sh
@ 2008-01-15 22:44 lhh
  0 siblings, 0 replies; 8+ messages in thread
From: lhh @ 2008-01-15 22:44 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	lhh at sourceware.org	2008-01-15 22:44:31

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

Log message:
	Fix #428346

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

--- cluster/rgmanager/src/resources/fs.sh	2008/01/15 22:34:14	1.17.2.5
+++ cluster/rgmanager/src/resources/fs.sh	2008/01/15 22:44:31	1.17.2.6
@@ -909,7 +909,7 @@
 			return $OCF_ERR_ARGS
 		fi
 	else
-		ocf_log err "\
+		ocf_log notice "\
 startFilesystem: Creating mount point $mp for device $dev"
 		mkdir -p $mp
 	fi



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/resources fs.sh
@ 2008-01-15 22:34 lhh
  0 siblings, 0 replies; 8+ messages in thread
From: lhh @ 2008-01-15 22:34 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	lhh at sourceware.org	2008-01-15 22:34:14

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

Log message:
	Fix #428346

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

--- cluster/rgmanager/src/resources/fs.sh	2007/05/21 15:57:29	1.17.2.4
+++ cluster/rgmanager/src/resources/fs.sh	2008/01/15 22:34:14	1.17.2.5
@@ -525,9 +525,9 @@
 
 	dev=$(real_device $1)
 	if [ -z "$dev" ]; then
-		ocf_log err \
+		ocf_log debug \
 			"fs (isMounted): Could not match $1 with a real device"
-		return $FAIL
+		dev=$1
 	fi
 	mp=$2
 	
@@ -1114,9 +1114,9 @@
 	#
 	dev=$(real_device $OCF_RESKEY_device)
 	if [ -z "$dev" ]; then
-			ocf_log err "\
+		ocf_log debug "\
 stop: Could not match $OCF_RESKEY_device with a real device"
-			return $FAIL
+		dev=$OCF_RESKEY_device
 	fi
 
 	#



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/resources fs.sh
@ 2007-02-13 15:56 lhh
  0 siblings, 0 replies; 8+ messages in thread
From: lhh @ 2007-02-13 15:56 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	lhh at sourceware.org	2007-02-13 15:56:10

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

Log message:
	Apply fixes from RHEL4 branch

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/fs.sh.diff?cvsroot=cluster&r1=1.18&r2=1.19

--- cluster/rgmanager/src/resources/fs.sh	2006/12/14 22:18:07	1.18
+++ cluster/rgmanager/src/resources/fs.sh	2007/02/13 15:56:10	1.19
@@ -320,7 +320,7 @@
 	[ -z "$OCF_RESKEY_fstype" ] && return 0
 
 	case $OCF_RESKEY_fstype in
-	ext2|ext3|jfs|xfs|reiserfs|vfat|tmpfs)
+	ext2|ext3|jfs|xfs|reiserfs|vfat|tmpfs|vxfs)
 		return 0
 		;;
 	*)
@@ -544,8 +544,8 @@
 			# place
 			#
 			if [ -n "$tmp_mp"  -a "$tmp_mp"  != "$mp" ]; then
-				ocf_log warn "\
-Device $dev is mounted on $tmp_mp instead of $mp"
+				ocf_log warn \
+"Device $dev is mounted on $tmp_mp instead of $mp"
 			fi
 			return $YES
 		fi
@@ -802,6 +802,7 @@
 enable_fs_quotas()
 {
 	declare -i need_check=0
+	declare -i rv
 	declare quotaopts=""
 	declare mopt
 	declare opts=$1
@@ -849,8 +850,13 @@
 	ocf_log info "Enabling Quotas on $mp"
 	ocf_log debug "quotaon -$quotaopts $mp"
 	quotaon -$quotaopts $mp
+	rv=$?
+	if [ $rv -ne 0 ]; then
+		# Just a warning
+		ocf_log warn "Unable to turn on quotas for $mp; return = $rv"
+	fi
 
-	return $?
+	return $rv
 }
 
 
@@ -872,14 +878,14 @@
 	mp=${OCF_RESKEY_mountpoint}
 	case "$mp" in 
       	""|"[ 	]*")		# nothing to mount
-    		return $SUCCESS
+    		return $OCF_SUCCESS
     		;;
 	/*)			# found it
 	  	;;
 	*)	 		# invalid format
 			ocf_log err \
 "startFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
-	    	return $FAIL
+	    	return $OCF_ERR_ARGS
 	    	;;
 	esac
 	
@@ -890,7 +896,7 @@
 	if [ -z "$dev" ]; then
 			ocf_log err "\
 startFilesystem: Could not match $OCF_RESKEY_device with a real device"
-			return $FAIL
+			return $OCF_ERR_ARGS
 	fi
 
 	#
@@ -900,7 +906,7 @@
 		if ! [ -d "$mp" ]; then
 			ocf_log err"\
 startFilesystem: Mount point $mp exists but is not a directory"
-			return $FAIL
+			return $OCF_ERR_ARGS
 		fi
 	else
 		ocf_log err "\
@@ -929,7 +935,7 @@
 	case $? in
 	$YES)		# already mounted
 		ocf_log debug "$dev already mounted"
-		return $SUCCESS
+		return $OCF_SUCCESS
 		;;
 	$NO)		# not mounted, continue
 		;;
@@ -1076,7 +1082,8 @@
 	typeset -i ret_val=0
 	typeset -i try=1
 	typeset -i max_tries=3		# how many times to try umount
-	typeset -i sleep_time=2		# time between each umount failure
+	typeset -i sleep_time=5		# time between each umount failure
+	typeset -i nfslock_reclaim=0
 	typeset done=""
 	typeset umount_failed=""
 	typeset force_umount=""
@@ -1168,14 +1175,12 @@
 				     [ "$OCF_RESKEY_nfslock" = "1" ]; then
 				    ocf_log warning \
 					"Dropping node-wide NFS locks"
+				    pkill -KILL -x lockd
 	          		    mkdir -p $mp/.clumanager/statd
 				    # Copy out the notify list; our 
 				    # IPs are already torn down
-				    if notify_list_store $mp/.clumanager/statd
-				    then
-				      notify_list_broadcast \
-				        $mp/.clumanager/statd
-				    fi
+				    notify_list_store $mp/.clumanager/statd
+				    nfslock_reclaim=1
 				  fi
 				fi
 			fi
@@ -1200,6 +1205,11 @@
 		fi
 	done # while 
 
+	if [ $nfslock_reclaim -eq 1 ]; then
+		# If we have this flag set, do a full reclaim broadcast
+		notify_list_broadcast $mp/.clumanager/statd
+	fi
+
 	if [ -n "$umount_failed" ]; then
 		ocf_log err "'umount $mp' failed, error=$ret_val"
 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/resources fs.sh
@ 2007-02-13 15:52 lhh
  0 siblings, 0 replies; 8+ messages in thread
From: lhh @ 2007-02-13 15:52 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	STABLE
Changes by:	lhh at sourceware.org	2007-02-13 15:52:45

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

Log message:
	Allow single-instance VxFS failover in the file system RA (#214935)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/fs.sh.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.4.2.6.4.8&r2=1.4.2.6.4.9

--- cluster/rgmanager/src/resources/fs.sh	2007/01/22 23:10:01	1.4.2.6.4.8
+++ cluster/rgmanager/src/resources/fs.sh	2007/02/13 15:52:45	1.4.2.6.4.9
@@ -320,7 +320,7 @@
 	[ -z "$OCF_RESKEY_fstype" ] && return 0
 
 	case $OCF_RESKEY_fstype in
-	ext2|ext3|jfs|xfs|reiserfs|vfat|tmpfs)
+	ext2|ext3|jfs|xfs|reiserfs|vfat|tmpfs|vxfs)
 		return 0
 		;;
 	*)



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/resources fs.sh
@ 2007-02-13 15:51 lhh
  0 siblings, 0 replies; 8+ messages in thread
From: lhh @ 2007-02-13 15:51 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh at sourceware.org	2007-02-13 15:51:30

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

Log message:
	Allow single-instance VxFS failover in the file system RA (#214935)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/fs.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.4.2.19&r2=1.4.2.20

--- cluster/rgmanager/src/resources/fs.sh	2006/12/13 18:28:41	1.4.2.19
+++ cluster/rgmanager/src/resources/fs.sh	2007/02/13 15:51:30	1.4.2.20
@@ -320,7 +320,7 @@
 	[ -z "$OCF_RESKEY_fstype" ] && return 0
 
 	case $OCF_RESKEY_fstype in
-	ext2|ext3|jfs|xfs|reiserfs|vfat|tmpfs)
+	ext2|ext3|jfs|xfs|reiserfs|vfat|tmpfs|vxfs)
 		return 0
 		;;
 	*)



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/resources fs.sh
@ 2006-12-13 18:28 lhh
  0 siblings, 0 replies; 8+ messages in thread
From: lhh @ 2006-12-13 18:28 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh at sourceware.org	2006-12-13 18:28:41

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

Log message:
	Fix #217147; patch by Navid Sheikhol-Eslami (navid redhat com)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/fs.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.4.2.18&r2=1.4.2.19

--- cluster/rgmanager/src/resources/fs.sh	2006/11/03 16:26:19	1.4.2.18
+++ cluster/rgmanager/src/resources/fs.sh	2006/12/13 18:28:41	1.4.2.19
@@ -496,6 +496,18 @@
 
 
 #
+# trim_trailing_slash path
+#
+# Trim trailing slash from given path.
+#
+trim_trailing_slash() {
+	declare mpath=$1
+
+	echo $mpath | sed -e 's/\/*$//'
+}
+
+
+#
 # isMounted device mount_point
 #
 # Check to see if the device is mounted.  Print a warning if its not
@@ -523,6 +535,8 @@
 	do
 		#echo "spec=$1 dev=$dev  tmp_dev=$tmp_dev"
 		tmp_dev=$(real_device $tmp_dev)
+		tmp_mp=$(trim_trailing_slash $tmp_mp)
+		mp=$(trim_trailing_slash $mp)
 
 		if [ -n "$tmp_dev" -a "$tmp_dev" = "$dev" ]; then
 			#



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/resources fs.sh
@ 2006-07-26 15:31 lhh
  0 siblings, 0 replies; 8+ messages in thread
From: lhh @ 2006-07-26 15:31 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4U4
Changes by:	lhh at sourceware.org	2006-07-26 15:31:20

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

Log message:
	Change ordering in fs.sh to avoid possibility of a lock being reclaimed on the fs we're trying to unmount

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/fs.sh.diff?cvsroot=cluster&only_with_tag=RHEL4U4&r1=1.4.2.14&r2=1.4.2.14.2.1

--- cluster/rgmanager/src/resources/fs.sh	2006/06/16 19:57:52	1.4.2.14
+++ cluster/rgmanager/src/resources/fs.sh	2006/07/26 15:31:20	1.4.2.14.2.1
@@ -1061,7 +1061,8 @@
 	typeset -i ret_val=0
 	typeset -i try=1
 	typeset -i max_tries=3		# how many times to try umount
-	typeset -i sleep_time=2		# time between each umount failure
+	typeset -i sleep_time=5		# time between each umount failure
+	typeset -i nfslock_reclaim=0
 	typeset done=""
 	typeset umount_failed=""
 	typeset force_umount=""
@@ -1157,11 +1158,8 @@
 	          		    mkdir -p $mp/.clumanager/statd
 				    # Copy out the notify list; our 
 				    # IPs are already torn down
-				    if notify_list_store $mp/.clumanager/statd
-				    then
-				      notify_list_broadcast \
-				        $mp/.clumanager/statd
-				    fi
+				    notify_list_store $mp/.clumanager/statd
+				    nfslock_reclaim=1
 				  fi
 				fi
 			fi
@@ -1186,6 +1184,11 @@
 		fi
 	done # while 
 
+	if [ $nfslock_reclaim -eq 1 ]; then
+		# If we have this flag set, do a full reclaim broadcast
+		notify_list_broadcast $mp/.clumanager/statd
+	fi
+
 	if [ -n "$umount_failed" ]; then
 		ocf_log err "'umount $mp' failed, error=$ret_val"
 



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-01-15 22:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-13 15:55 [Cluster-devel] cluster/rgmanager/src/resources fs.sh lhh
  -- strict thread matches above, loose matches on Subject: below --
2008-01-15 22:44 lhh
2008-01-15 22:34 lhh
2007-02-13 15:56 lhh
2007-02-13 15:52 lhh
2007-02-13 15:51 lhh
2006-12-13 18:28 lhh
2006-07-26 15:31 lhh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.