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

[Cluster-devel] [PATCH] resource-agents: Allow multiple mounts from the same NFS export



Allow multiple mounts from the same NFS export

Resolves: rhbz#799998

If the fstype is set to nfs, cifs or nfs4 (netfs file types), then we don't say that we're in use or mounted in certain circumstances.
>From c4a8c83785a3d5dbf8fd0581ffcc3ef3e2678f50 Mon Sep 17 00:00:00 2001
From: Chris Feist <cfeist redhat com>
Date: Mon, 5 Mar 2012 15:08:15 -0600
Subject: [PATCH 6/7] Allow multiple mounts from the same NFS export

Resolves: rhbz#799998
---
 rgmanager/src/resources/utils/fs-lib.sh |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/rgmanager/src/resources/utils/fs-lib.sh b/rgmanager/src/resources/utils/fs-lib.sh
index 45cec70..3bc7cac 100644
--- a/rgmanager/src/resources/utils/fs-lib.sh
+++ b/rgmanager/src/resources/utils/fs-lib.sh
@@ -220,7 +220,13 @@ mount_in_use () {
 		fi
 
 		if [ -n "$tmp_dev" -a "$tmp_dev" = "$dev" ]; then
-			return $YES
+		  case $OCF_RESKEY_fstype in
+		    cifs|nfs|nfs4)
+		      ;;
+		    *)
+		      return $YES
+		      ;;
+		  esac
 		fi
 
 		# Mountpoint from /proc/mounts containing spaces will
@@ -308,9 +314,17 @@ is_mounted () {
 	done < /proc/mounts
 
 	if [ $ret -eq $YES ] && [ $found -ne 0 ]; then
-		ocf_log warn "Device $dev is mounted on $poss_mp instead of $mp"
+		case $OCF_RESKEY_fstype in
+		  cifs|nfs|nfs4)
+		    ret=$NO
+		    ;;
+		  *)
+		    ocf_log warn "Device $dev is mounted on $poss_mp instead of $mp"
+		    ;;
+		esac
 	fi
 
+
 	return $ret
 }
 
-- 
1.7.7.6


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