53 lines
1.8 KiB
Diff
53 lines
1.8 KiB
Diff
|
From fcfd40132624df5e888d53b4a8c4ce1cf7087413 Mon Sep 17 00:00:00 2001
|
||
|
From: "Kaleb S. KEITHLEY" <kkeithle@redhat.com>
|
||
|
Date: Wed, 2 Jun 2021 07:40:04 -0400
|
||
|
Subject: [PATCH 551/584] common-ha: ensure shared_storage is mounted before
|
||
|
setup (#2296)
|
||
|
|
||
|
If gluster shared-storage isn't mounted, ganesha will fail to start
|
||
|
|
||
|
commit a249b9020d281d0482db0aeb52e8856acd931e02
|
||
|
https://github.com/gluster/glusterfs/issues/2278
|
||
|
https://github.com/gluster/glusterfs/pull/2296
|
||
|
|
||
|
Change-Id: I6ed7044ea6b6c61b013ebe17088bfde311b109b7
|
||
|
BUG: 1918018
|
||
|
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
|
||
|
Reviewed-on: https://code.engineering.redhat.com/gerrit/c/rhs-glusterfs/+/244592
|
||
|
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
||
|
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
||
|
---
|
||
|
extras/ganesha/scripts/ganesha-ha.sh | 13 +++++++++++++
|
||
|
1 file changed, 13 insertions(+)
|
||
|
|
||
|
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
|
||
|
index 491c61d..012084f 100644
|
||
|
--- a/extras/ganesha/scripts/ganesha-ha.sh
|
||
|
+++ b/extras/ganesha/scripts/ganesha-ha.sh
|
||
|
@@ -195,9 +195,22 @@ setup_cluster()
|
||
|
local servers=${3}
|
||
|
local unclean=""
|
||
|
local quorum_policy="stop"
|
||
|
+ local dfresult=""
|
||
|
|
||
|
logger "setting up cluster ${name} with the following ${servers}"
|
||
|
|
||
|
+ # check that shared_storage is mounted
|
||
|
+ dfresult=$(df -T ${HA_VOL_MNT})
|
||
|
+ if [[ -z "${dfresult}" ]]; then
|
||
|
+ logger "gluster shared_storage is not mounted, exiting..."
|
||
|
+ exit 1
|
||
|
+ fi
|
||
|
+
|
||
|
+ if [[ "${dfresult}" != *"fuse.glusterfs"* ]]; then
|
||
|
+ logger "gluster shared_storage is not mounted, exiting..."
|
||
|
+ exit 1
|
||
|
+ fi
|
||
|
+
|
||
|
# pcs cluster setup --force ${PCS9OR10_PCS_CNAME_OPTION} ${name} ${servers}
|
||
|
pcs cluster setup --force ${PCS9OR10_PCS_CNAME_OPTION} ${name} --enable ${servers}
|
||
|
if [ $? -ne 0 ]; then
|
||
|
--
|
||
|
1.8.3.1
|
||
|
|