summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2013-10-25 12:24:12 +1100
committerMartin Schwenke <martin@meltin.net>2013-10-25 15:03:19 +1100
commit383f04623beb38a2f23d492232643ddb51cf7d09 (patch)
treea5bdcc3aee454233318edf32010acf855ce7b018 /base
parent501c4b9f468606bbab2b81c5c64fbb08331c4674 (diff)
downloadautocluster-383f04623beb38a2f23d492232643ddb51cf7d09.tar.gz
autocluster-383f04623beb38a2f23d492232643ddb51cf7d09.tar.xz
autocluster-383f04623beb38a2f23d492232643ddb51cf7d09.zip
Recovery lock directory should be created in cluster_configure
This hasn't really got anything to do with GPFS. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'base')
-rwxr-xr-xbase/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/events/post9
-rwxr-xr-xbase/all/root/scripts/setup_gpfs.sh15
2 files changed, 10 insertions, 14 deletions
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/events/post b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/events/post
index 5a33058..1777cff 100755
--- a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/events/post
+++ b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/1.2.4#/events/post
@@ -1,2 +1,11 @@
#!/bin/sh
+
+set -e
+
+. /etc/sysconfig/ctdb
+if [ -n "$CTDB_RECOVERY_LOCK" ] ; then
+ d=$(dirname "$CTDB_RECOVERY_LOCK")
+ mkdir -p "$d"
+fi
+
exec service ctdb restart
diff --git a/base/all/root/scripts/setup_gpfs.sh b/base/all/root/scripts/setup_gpfs.sh
index 6963e87..920fe38 100755
--- a/base/all/root/scripts/setup_gpfs.sh
+++ b/base/all/root/scripts/setup_gpfs.sh
@@ -33,8 +33,6 @@ Usage: $0 [ OPTION ]
--mountpoint=<dir> The directory where the GPFS filesystem
should be mounted.
- --no-reclock Don't setup the CTDB recovery lock in the
- GPFS filesystem.
EOF
exit 1
}
@@ -42,9 +40,8 @@ EOF
gpfs_num_nsds="@@GPFS_DEFAULT_NSDS@@"
cluster_name="@@CLUSTER@@"
mountpoint="@@GPFS_DEFAULT_MOUNTPOINT@@"
-do_reclock=true
-opts="gpfs-num-nsds:,cluster-name:,mountpoint:,no-reclock"
+opts="gpfs-num-nsds:,cluster-name:,mountpoint:"
getopt_output=$(getopt -n autocluster -o h -l "$opts" -- "$@")
[ $? != 0 ] && usage
@@ -54,7 +51,6 @@ while true ; do
--gpfs-num-nsds) gpfs_num_nsds="$2" ; shift 2 ;;
--cluster-name) cluster_name="$2" ; shift 2 ;;
--mountpoint) mountpoint="$2" ; shift 2 ;;
- --no-reclock) do_reclock=false ; shift ;;
--) shift ; break ;;
-h) usage ;;
*) echo "Unknown option \"$1\"" ; usage ;;
@@ -167,15 +163,6 @@ echo "Waiting for gpfs to mount"
while ! mount | grep /dev/gpfs0 > /dev/null; do echo -n "."; sleep 1; done
echo
-if $do_reclock ; then
- echo "Setting up ctdb recovery lock"
- mkdir -p "${mountpoint}/.ctdb"
- set -e
- f=/etc/sysconfig/ctdb
- sed -i -e "s@.*CTDB_RECOVERY_LOCK=\"/some/place/on/shared/storage\"@CTDB_RECOVERY_LOCK=${mountpoint}/.ctdb/shared@g" $f
- onnode -p all rsync -av $HOSTNAME:$f $f
-fi
-
echo "GPFS setup complete"
# LocalWords: DEF