Re: activeMonitor()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2005-11-04 at 12:22 -0500, Lon Hohberger wrote:
> On Fri, 2005-11-04 at 12:20 -0500, DeadManMoving wrote:
> 
> > Do you have any idea of what will be the configuration directives (in
> > cluster.conf?) to deal with that daemon?
> 
> active_monitor="1"
> 
> It doesn't work without the daemon, which I will get to committing today
> or Monday.	
> 
> > I'll try as soon as i can, cause right now, the only thing i do is
> > quotaon after the device is mounted and quotaoff before the device is
> > unmounted because i always need quota support (will try to post a patch
> > to make it conditionnal depending if the user specified quota in
> > $mount_options).
> 
> Great!
> 

Here it is, i can't tell if this is the best way to do it and i can't
test it right now cause my cluster is in production and i don't have any
other servers available right now. Any comments are welcome!
 
> -- Lon
> 

Thanks,

Tony Lapointe
--- fs.sh	2005-11-04 13:00:10.000000000 -0500
+++ fs_quota.sh	2005-11-04 13:08:11.000000000 -0500
@@ -947,6 +947,13 @@
 		return $FAIL
 	fi
 
+	#
+	# Turn on quota support if supplied in $mount_options
+	#
+	if echo $mount_options | sed 's/,/ /g' | grep -qw quota; then
+		quotaon $mp || return $OCF_ERR_GENERIC
+	fi
+
 	activeMonitor start || return $OCF_ERR_GENERIC
 	
 	return $SUCCESS
@@ -1035,6 +1042,13 @@
 			sync; sync; sync
 			ocf_log info "unmounting $mp"
 
+			#
+			# Turn off quota support if it's active for $mp
+			#
+			if quotaon -pa | grep $mp | grep -qw on; then
+				quotaoff $mp || return $OCF_ERR_GENERIC
+			fi
+
 			activeMonitor stop || return $OCF_ERR_GENERIC
 
 			umount $mp
--

Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux