From 6da8126a115419587672d16e2440c322a837da6b Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 6 Jun 2014 15:25:28 +1000 Subject: [PATCH] ctdb-eventscripts: New configuration variable CTDB_GANESHA_REC_SUBDIR Backup and restore of the cluster filesystem can upset the operation of 60.ganesha by changing the contents of this subdirectory. Allow this subdirectory to be configured to a subdirectory that is ignored by backup and restore processes. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Wed Jun 11 09:29:22 CEST 2014 on sn-devel-104 --- ctdb/config/events.d/60.ganesha | 8 +++++--- ctdb/doc/ctdbd.conf.5.xml | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ctdb/config/events.d/60.ganesha b/ctdb/config/events.d/60.ganesha index e8a52b03b86..e085ed3bf83 100755 --- a/ctdb/config/events.d/60.ganesha +++ b/ctdb/config/events.d/60.ganesha @@ -82,22 +82,24 @@ get_nodenum() create_ganesha_recdirs () { + [ -n "$CTDB_GANESHA_REC_SUBDIR" ] || CTDB_GANESHA_REC_SUBDIR=".ganesha" + MOUNTS=$(mount -t $CTDB_CLUSTER_FILESYSTEM_TYPE) if [ -z "$MOUNTS" ]; then echo "startup $CTDB_CLUSTER_FILESYSTEM_TYPE not ready" exit 0 fi MNTPT=$(echo "$MOUNTS" | sort | awk 'NR == 1 {print $3}') - mkdir -p $MNTPT/.ganesha + mkdir -p $MNTPT/$CTDB_GANESHA_REC_SUBDIR if [ -e $GANRECDIR ]; then if [ ! -L $GANRECDIR ] ; then rm -rf $GANRECDIR - if ! ln -s $MNTPT/.ganesha $GANRECDIR ; then + if ! ln -s $MNTPT/$CTDB_GANESHA_REC_SUBDIR $GANRECDIR ; then echo "ln failed" fi fi else - if ! ln -sf $MNTPT/.ganesha $GANRECDIR ; then + if ! ln -sf $MNTPT/$CTDB_GANESHA_REC_SUBDIR $GANRECDIR ; then echo "ln failed" fi fi diff --git a/ctdb/doc/ctdbd.conf.5.xml b/ctdb/doc/ctdbd.conf.5.xml index 98d09249320..149aa627f03 100644 --- a/ctdb/doc/ctdbd.conf.5.xml +++ b/ctdb/doc/ctdbd.conf.5.xml @@ -923,6 +923,21 @@ CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000 + CTDB_GANESHA_REC_SUBDIRSUBDIR + + + SUBDIR is the name of a top-level subdirectory in the + first cluster filesystem. This subdirectory is used to + allow communication between NFS-Ganesha and the + 60.ganesha script. + + + Default is ".ganesha". + + + + + CTDB_MANAGES_NFS=yes|no -- 2.11.4.GIT