|
|
74096c |
From ccd45222c46b91b4d0cd57db9ea8b1515c97ada0 Mon Sep 17 00:00:00 2001
|
|
|
74096c |
From: Shwetha K Acharya <sacharya@redhat.com>
|
|
|
74096c |
Date: Mon, 31 Aug 2020 20:08:39 +0530
|
|
|
74096c |
Subject: [PATCH 472/473] geo-rep: gluster_shared_storage fails to automount on
|
|
|
74096c |
node reboot on rhel 8.
|
|
|
74096c |
|
|
|
74096c |
Issue: On reboot, all the mounts get wiped out.
|
|
|
74096c |
Only the mounts mentioned in /etc/fstab automatically gets mounted
|
|
|
74096c |
during boot/reboot.
|
|
|
74096c |
|
|
|
74096c |
But /etc/fstab complains on not getting a canonical path
|
|
|
74096c |
(it gets path containing a symlink)
|
|
|
74096c |
This is because the gluster_shared_storage, is mounted to
|
|
|
74096c |
/var/run which is symlink to /run. This is a general practice
|
|
|
74096c |
followed by most operating systems.
|
|
|
74096c |
|
|
|
74096c |
[root@ ~]# ls -lsah /var/run
|
|
|
74096c |
0 lrwxrwxrwx. 1 root root 6 Jul 22 19:39 /var/run -> ../run
|
|
|
74096c |
|
|
|
74096c |
Fix: Mount gluster_shared_storage on /run.
|
|
|
74096c |
(Also It is seen that /var/run is mostly
|
|
|
74096c |
used by old or legacy systems, thus it is a good practice to
|
|
|
74096c |
update /var/run to /run)
|
|
|
74096c |
|
|
|
74096c |
>fixes: #1459
|
|
|
74096c |
>Change-Id: I8c16653be8cd746c84f01abf0eea19284fb97c77
|
|
|
74096c |
>Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
|
|
|
74096c |
|
|
|
74096c |
backport of https://review.gluster.org/#/c/glusterfs/+/24934/
|
|
|
74096c |
BUG: 1873469
|
|
|
74096c |
Change-Id: I8c16653be8cd746c84f01abf0eea19284fb97c77
|
|
|
74096c |
Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
|
|
|
74096c |
Reviewed-on: https://code.engineering.redhat.com/gerrit/211387
|
|
|
74096c |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
74096c |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
74096c |
---
|
|
|
74096c |
.../set/post/S32gluster_enable_shared_storage.sh | 18 +++++++++---------
|
|
|
74096c |
geo-replication/gsyncd.conf.in | 2 +-
|
|
|
74096c |
2 files changed, 10 insertions(+), 10 deletions(-)
|
|
|
74096c |
|
|
|
74096c |
diff --git a/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh b/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh
|
|
|
74096c |
index 885ed03..3bae37c 100755
|
|
|
74096c |
--- a/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh
|
|
|
74096c |
+++ b/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh
|
|
|
74096c |
@@ -79,9 +79,9 @@ done
|
|
|
74096c |
|
|
|
74096c |
if [ "$option" == "disable" ]; then
|
|
|
74096c |
# Unmount the volume on all the nodes
|
|
|
74096c |
- umount /var/run/gluster/shared_storage
|
|
|
74096c |
- cat /etc/fstab | grep -v "gluster_shared_storage /var/run/gluster/shared_storage/" > /var/run/gluster/fstab.tmp
|
|
|
74096c |
- mv /var/run/gluster/fstab.tmp /etc/fstab
|
|
|
74096c |
+ umount /run/gluster/shared_storage
|
|
|
74096c |
+ cat /etc/fstab | grep -v "gluster_shared_storage /run/gluster/shared_storage/" > /run/gluster/fstab.tmp
|
|
|
74096c |
+ mv /run/gluster/fstab.tmp /etc/fstab
|
|
|
74096c |
fi
|
|
|
74096c |
|
|
|
74096c |
if [ "$is_originator" == 1 ]; then
|
|
|
74096c |
@@ -105,7 +105,7 @@ function check_volume_status()
|
|
|
74096c |
}
|
|
|
74096c |
|
|
|
74096c |
mount_cmd="mount -t glusterfs $local_node_hostname:/gluster_shared_storage \
|
|
|
74096c |
- /var/run/gluster/shared_storage"
|
|
|
74096c |
+ /run/gluster/shared_storage"
|
|
|
74096c |
|
|
|
74096c |
if [ "$option" == "enable" ]; then
|
|
|
74096c |
retry=0;
|
|
|
74096c |
@@ -120,10 +120,10 @@ if [ "$option" == "enable" ]; then
|
|
|
74096c |
status=$(check_volume_status)
|
|
|
74096c |
done
|
|
|
74096c |
# Mount the volume on all the nodes
|
|
|
74096c |
- umount /var/run/gluster/shared_storage
|
|
|
74096c |
- mkdir -p /var/run/gluster/shared_storage
|
|
|
74096c |
+ umount /run/gluster/shared_storage
|
|
|
74096c |
+ mkdir -p /run/gluster/shared_storage
|
|
|
74096c |
$mount_cmd
|
|
|
74096c |
- cp /etc/fstab /var/run/gluster/fstab.tmp
|
|
|
74096c |
- echo "$local_node_hostname:/gluster_shared_storage /var/run/gluster/shared_storage/ glusterfs defaults 0 0" >> /var/run/gluster/fstab.tmp
|
|
|
74096c |
- mv /var/run/gluster/fstab.tmp /etc/fstab
|
|
|
74096c |
+ cp /etc/fstab /run/gluster/fstab.tmp
|
|
|
74096c |
+ echo "$local_node_hostname:/gluster_shared_storage /run/gluster/shared_storage/ glusterfs defaults 0 0" >> /run/gluster/fstab.tmp
|
|
|
74096c |
+ mv /run/gluster/fstab.tmp /etc/fstab
|
|
|
74096c |
fi
|
|
|
74096c |
diff --git a/geo-replication/gsyncd.conf.in b/geo-replication/gsyncd.conf.in
|
|
|
74096c |
index 11e57fd..9688c79 100644
|
|
|
74096c |
--- a/geo-replication/gsyncd.conf.in
|
|
|
74096c |
+++ b/geo-replication/gsyncd.conf.in
|
|
|
74096c |
@@ -123,7 +123,7 @@ type=bool
|
|
|
74096c |
help=Use this to set Active Passive mode to meta-volume.
|
|
|
74096c |
|
|
|
74096c |
[meta-volume-mnt]
|
|
|
74096c |
-value=/var/run/gluster/shared_storage
|
|
|
74096c |
+value=/run/gluster/shared_storage
|
|
|
74096c |
help=Meta Volume or Shared Volume mount path
|
|
|
74096c |
|
|
|
74096c |
[allow-network]
|
|
|
74096c |
--
|
|
|
74096c |
1.8.3.1
|
|
|
74096c |
|