gluster/shared_storage: Add/Remove shared storage from /etc/fstab during enable/disable
While creating/deleting shared storage volume, add/remove the shared storage entry from /etc/fstab, so as to ensure availability of the shared storage, even after a node reboot Change-Id: Ib9edc8fd02c74a677062ca53ffd10be997b056c6 BUG: 1231876 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11272 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
This commit is contained in:
parent
d9e688e42a
commit
bc6d9d679a
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user