summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeghana Madhusudhan <mmadhusu@redhat.com>2015-04-13 14:08:53 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-04-14 10:23:51 +0000
commitc37045c9ab572de7aa4c0dec5eeef4273ffd538a (patch)
tree8c4971c79b8b9fa19428d7f001876a959f4abce4
parentc528589a585c23b4288784247310b8763612a822 (diff)
NFS-Ganesha : Use common meta-volume for shared storage
A fixed name and mount point is used to share the common volume required by various components. Make appropriate changes on the NFS-Ganesha to accomodate the commom meta-volume as the shared storage. Change-Id: I9c87e486c2bb3a414f9773c74ed46e111f3c9c14 BUG: 1210344 Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/10211 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System
-rw-r--r--extras/ganesha/config/ganesha-ha.conf.sample7
-rwxr-xr-xextras/ganesha/scripts/ganesha-ha.sh28
2 files changed, 17 insertions, 18 deletions
diff --git a/extras/ganesha/config/ganesha-ha.conf.sample b/extras/ganesha/config/ganesha-ha.conf.sample
index 68408e0..f8536d3 100644
--- a/extras/ganesha/config/ganesha-ha.conf.sample
+++ b/extras/ganesha/config/ganesha-ha.conf.sample
@@ -1,10 +1,7 @@
# Name of the HA cluster created.
HA_NAME="ganesha-ha-360"
-# Shared volume to store NFS state.
-HA_VOL_NAME="ha-state-volname"
-# Mount point of the shared volume.
-HA_VOL_MNT="/mnt-nfs"
-# The server on which shared volume is created.
+# The server from which you intend to mount
+# the shared volume.
HA_VOL_SERVER="server1"
# The subset of nodes of the Gluster Trusted Pool
# that forms the ganesha HA cluster. IP/Hostname
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
index 845c969..0daaea6 100755
--- a/extras/ganesha/scripts/ganesha-ha.sh
+++ b/extras/ganesha/scripts/ganesha-ha.sh
@@ -21,6 +21,8 @@
HA_NUM_SERVERS=0
HA_SERVERS=""
HA_CONFDIR=""
+HA_SHARED_VOLUME="gluster_shared_storage"
+HA_VOL_MNT="/var/run/gluster/shared_storage"
RHEL6_PCS_CNAME_OPTION="--name"
@@ -545,20 +547,20 @@ setup_state_volume()
dname=${longname#$(hostname -s)}
while [[ ${1} ]]; do
- mkdir ${mnt}/${1}${dname}
- mkdir ${mnt}/${1}${dname}/nfs
- mkdir ${mnt}/${1}${dname}/nfs/ganesha
- mkdir ${mnt}/${1}${dname}/nfs/statd
- touch ${mnt}/${1}${dname}/nfs/state
- mkdir ${mnt}/${1}${dname}/nfs/ganesha/v4recov
- mkdir ${mnt}/${1}${dname}/nfs/ganesha/v4old
- mkdir ${mnt}/${1}${dname}/nfs/statd/sm
- mkdir ${mnt}/${1}${dname}/nfs/statd/sm.bak
- mkdir ${mnt}/${1}${dname}/nfs/statd/state
+ mkdir ${mnt}/nfs-ganesha/${1}${dname}
+ mkdir ${mnt}/nfs-ganesha/${1}${dname}/nfs
+ mkdir ${mnt}/nfs-ganesha/${1}${dname}/nfs/ganesha
+ mkdir ${mnt}/nfs-ganesha/${1}${dname}/nfs/statd
+ touch ${mnt}/nfs-ganesha/${1}${dname}/nfs/state
+ mkdir ${mnt}/nfs-ganesha/${1}${dname}/nfs/ganesha/v4recov
+ mkdir ${mnt}/nfs-ganesha/${1}${dname}/nfs/ganesha/v4old
+ mkdir ${mnt}/nfs-ganesha/${1}${dname}/nfs/statd/sm
+ mkdir ${mnt}/nfs-ganesha/${1}${dname}/nfs/statd/sm.bak
+ mkdir ${mnt}/nfs-ganesha/${1}${dname}/nfs/statd/state
for server in ${HA_SERVERS} ; do
if [ ${server} != ${1}${dname} ]; then
- ln -s ${mnt}/${server}/nfs/ganesha ${mnt}/${1}${dname}/nfs/ganesha/${server}
- ln -s ${mnt}/${server}/nfs/statd ${mnt}/${1}${dname}/nfs/statd/${server}
+ ln -s ${mnt}/nfs-ganesha/${server}/nfs/ganesha ${mnt}/nfs-ganesha/${1}${dname}/nfs/ganesha/${server}
+ ln -s ${mnt}/nfs-ganesha/${server}/nfs/statd ${mnt}/nfs-ganesha/${1}${dname}/nfs/statd/${server}
fi
done
shift
@@ -592,7 +594,7 @@ main()
if [ "X${HA_NUM_SERVERS}X" != "X1X" ]; then
- # setup_state_volume ${HA_SERVERS}
+ setup_state_volume ${HA_SERVERS}
setup_cluster ${HA_NAME} ${HA_NUM_SERVERS} "${HA_SERVERS}"