summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
Diffstat (limited to 'extras')
-rwxr-xr-xextras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh b/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh
index 28fa0e53316..68bc44d2e05 100755
--- a/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh
+++ b/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh
@@ -80,6 +80,8 @@ done
if [ "$option" == "disable" ]; then
# Unmount the volume on all the nodes
umount /var/run/gluster/shared_storage
+ cat /etc/fstab | grep -v "gluster_shared_storage /var/run/gluster/shared_storage/" > /var/run/gluster/fstab.tmp
+ mv /var/run/gluster/fstab.tmp /etc/fstab
fi
if [ "$is_originator" == 1 ]; then
@@ -121,4 +123,7 @@ if [ "$option" == "enable" ]; then
umount /var/run/gluster/shared_storage
mkdir -p /var/run/gluster/shared_storage
$mount_cmd
+ cp /etc/fstab /var/run/gluster/fstab.tmp
+ echo "$local_node_hostname:/gluster_shared_storage /var/run/gluster/shared_storage/ glusterfs defaults 0 0" >> /var/run/gluster/fstab.tmp
+ mv /var/run/gluster/fstab.tmp /etc/fstab
fi