Add a variable CTDB_NFS_SKIP_SHARE_CHECK to sysconfig that can disable the check...
authorroot <root@rcn1.VSOFS1.COM>
Tue, 3 Mar 2009 20:21:55 +0000 (07:21 +1100)
committerroot <root@rcn1.VSOFS1.COM>
Tue, 3 Mar 2009 20:21:55 +0000 (07:21 +1100)
This can take very long if there are very many shares and is in that case better to implement in a separate cronjob than in ctdb eventscript

config/ctdb.sysconfig
config/events.d/60.nfs

index 25c29582d362b48dc8428c58c07eabc0440ec3dd..db5d16c3fec84573560a3e80f9bfff50af140118 100644 (file)
@@ -46,6 +46,7 @@
 # of them are available during each monitoring interval.
 # In that case this check can be disabled
 # CTDB_SAMBA_SKIP_SHARE_CHECK=yes
+# CTDB_NFS_SKIP_SHARE_CHECK=yes
 
 # specify which ports we should check that there is a daemon listening to
 # by default we use testparm and look in smb.conf to figure out.
index b3b0e69ea7da6c939e7cb631e4018ebf03d640d1..b5cd81921320591c6e27137f2fa0eebb32684d78 100755 (executable)
@@ -98,8 +98,10 @@ case $cmd in
        ctdb_check_rpc "NFS" 100003 3
 
        # and that its directories are available
-       nfs_dirs=$(exportfs | grep -v '^#' | grep '^/' | awk {'print $1;'})
-       ctdb_check_directories "nfs" $nfs_dirs
+       [ "$CTDB_NFS_SKIP_SHARE_CHECK" = "yes" ] || {
+           nfs_dirs=$(exportfs | grep -v '^#' | grep '^/' | awk {'print $1;'})
+           ctdb_check_directories "nfs" $nfs_dirs
+       }
 
        # check that lockd responds to rpc requests
        ctdb_check_rpc "lockd" 100021 1