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
# of them are available during each monitoring interval.
# In that case this check can be disabled
# CTDB_SAMBA_SKIP_SHARE_CHECK=yes
# 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.
# 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.
ctdb_check_rpc "NFS" 100003 3
# and that its directories are available
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
# check that lockd responds to rpc requests
ctdb_check_rpc "lockd" 100021 1