glusterfs/extras
Josiah f4497ee445 Update mount-shared-storage.sh to automatically include all enabled glusterfs mounts in fstab
Currently the mount-shared-storage.sh script requires manual entry of each volume and mount point. There is a TODO item from Bug 1452527 to automatically pull the list of glusterfs mounts from the /etc/fstab file, validate that they are mounted, or attempt to mount them. This is to complete that TODO item.

The extras/mount-shared-storage.sh file has been updated to read only active glusterfs mounts from the /etc/fstab file, verify if they are mounted, and attemt to mount them if they are not. It will exit with a status 0 if successfully mounted or status 1 if any of the mounts fail.

This method will allow the standard method of mounts in /etc/fstab to be utilized and will ensure they are monted following system reboots.

This can be tested by creating a volume, mounting it using the /etc/fstab method, and rebooting the server. Output will be similar to this:
Jun 29 19:09:38 localhost systemd[1]: Starting Mount glusterfs sharedstorage...
Jun 29 19:09:43 localhost mount-shared-storage.sh[4096]: /mnt/mount1 has been mounted
Jun 29 19:09:48 localhost mount-shared-storage.sh[4096]: /mnt/mount2 has been mounted
Jun 29 19:09:48 localhost systemd[1]: Started Mount glusterfs sharedstorage.

Multiple fixes based on code review suggestions and spellcheck

Removed spaces in grep for glusterfs as tabs are valid as well

Added tab as an IFS field separator for the lines read from /etc/fstab

Increased sleep time to 10 seconds before mount validation

Changed mount check to use “mountpoint -q”

Change-Id: Ib90c99ced8f7aefc8dbe87340afc73a28f6195e7
fixes: bz#1596789
Signed-off-by: Josiah <josiahp@gmail.com>
2018-07-10 19:38:48 +00:00
..
benchmarking Respect autotools docdir variable 2013-02-07 16:38:06 -08:00
cliutils core/build/various: python3 compat, prepare for python2 -> python3 2018-04-12 11:04:27 +00:00
command-completion bash-completion: Swap order of characters in egrep bracket expression 2015-09-08 07:49:30 -07:00
create_new_xlator core/various: python3 compat, prepare for python2 -> python3 2018-07-09 03:38:36 +00:00
devel-tools extras/devel-tools: Fix print-backtrace script 2017-11-26 23:05:14 +00:00
distributed-testing Replace the BROKEN_TESTS environment variable value 2018-07-06 10:42:52 +00:00
firewalld build: add --without-server option 2018-02-19 17:38:55 +00:00
FreeBSD Man page updates 2010-09-07 07:45:58 -07:00
geo-rep geo-rep/scheduler: Fix crash 2018-05-14 06:45:02 +00:00
hook-scripts extras/hooks: Do not blindly remove volume share from smb.conf 2018-05-07 05:04:04 +00:00
init.d build: add --without-server option 2018-02-19 17:38:55 +00:00
LinuxRPM build: conditionally build legacy gNFS server and associated sub-packaging 2017-04-28 14:08:41 +00:00
ocf ocf: use glusterd-workdir for finding volume status files 2018-04-02 12:59:12 +00:00
profiler core/build/various: python3 compat, prepare for python2 -> python3 2018-04-12 11:04:27 +00:00
quota core/various: python3 compat, prepare for python2 -> python3 2018-06-21 10:09:25 +00:00
snap_scheduler gcron: create the lockfile if it is missing 2018-06-18 04:06:16 +00:00
Solaris Change Copyright current year 2011-08-10 10:57:19 -07:00
systemd build: add --without-server option 2018-02-19 17:38:55 +00:00
test storage/posix: Adding implementation for posix_do_futimes 2017-10-05 12:57:35 +00:00
thin-arbiter thin-arbiter : Provide scripts and service file to start thin-arbiter process 2018-05-30 03:24:49 +00:00
Ubuntu Updating extras/Ubuntu with latest upstart configs (BUG: 1047007) 2013-12-29 23:03:52 -08:00
who-wrote-glusterfs who-wrote-glusterfs: add an alias for potatogim@potatogim.net 2017-11-16 15:43:08 +00:00
backend-cleanup.sh scripts: correct the usage of -perm in backend-cleanup.sh 2016-01-14 03:40:58 -08:00
backend-xattr-sanitize.sh backend-xattr-sanitize.sh: script added to extras/ 2009-05-07 15:12:09 +05:30
check_goto.pl gluster: Fix the recursive goto outs in the source code. 2014-07-21 10:26:20 -07:00
clang-checker.sh clang-analyzer: adding clang static analysis support 2016-06-07 06:56:09 -07:00
clear_xattrs.sh extras: add check for brick path existence 2012-01-05 09:18:11 -08:00
control-cpu-load.sh extras: scripts to control CPU/MEMORY for any gluster daemon during runtime 2017-11-13 11:07:06 +00:00
control-mem.sh extras: scripts to control CPU/MEMORY for any gluster daemon during runtime 2017-11-13 11:07:06 +00:00
disk_usage_sync.sh extras: Add script to be used before using quota translator. 2010-03-09 00:24:57 -08:00
failed-tests.py core/various: python3 compat, prepare for python2 -> python3 2018-07-09 03:38:36 +00:00
file_size_contri.sh extras: Add quota-related debugging scripts. 2011-06-19 20:41:21 -07:00
gfid-to-dirname.sh extras:add gfid-to-dirname.sh 2016-03-22 19:24:17 -07:00
git-branch-diff.py core/various: python3 compat, prepare for python2 -> python3 2018-07-09 03:38:36 +00:00
gluster-rsyslog-5.8.conf log: add comments to rsyslog gluster configuration file 2013-08-14 13:05:50 -07:00
gluster-rsyslog-7.2.conf log: add comments to rsyslog gluster configuration file 2013-08-14 13:05:50 -07:00
glusterd-sysconfig RHEL init script: ability to overwrite options from sysconfig 2012-12-12 07:36:26 -08:00
glusterd.vol.in glusterd : introduce timer in mgmt_v3_lock 2017-10-17 15:44:49 +00:00
glusterfs-georep-logrotate Stop logrotate from complaining about missing files. 2014-12-11 00:04:36 -08:00
glusterfs-logrotate debug/io-stats: Add FOP sampling feature 2015-11-01 09:14:34 -08:00
glusterfs-mode.el extras: glusterfs-mode.el has incorrect FSF address 2017-02-02 12:47:17 -05:00
glusterfs.vim All: License message change 2012-09-13 13:19:37 -07:00
gnfs-loganalyse.py core/various: python3 compat, prepare for python2 -> python3 2018-05-02 11:28:46 +00:00
group-db-workload extras/group : add database workload profile 2018-06-28 17:18:16 +00:00
group-gluster-block block-profile: enable cluster.eager-lock in block-profile 2018-05-01 12:22:48 +00:00
group-metadata-cache extras/group: Change the server inode table size when upcall is on 2018-03-24 05:38:47 +00:00
group-nl-cache extras/group: Change the server inode table size when upcall is on 2018-03-24 05:38:47 +00:00
group-virt.example extras: Disable choose-local in groups virt and gluster-block 2018-04-13 10:23:03 +00:00
logger.conf.example build: disable logging framework on rhel6 2013-10-18 08:30:08 -07:00
Makefile.am extras/group : add database workload profile 2018-06-28 17:18:16 +00:00
migrate-unify-to-distribute.sh enhancement to migrate-unify-to-distribute.sh 2009-04-18 11:42:52 +05:30
mount-shared-storage.sh Update mount-shared-storage.sh to automatically include all enabled glusterfs mounts in fstab 2018-07-10 19:38:48 +00:00
peer_add_secret_pub.in geo-rep: Fix ssh issue in geo-rep 2015-06-25 04:48:31 -07:00
post-upgrade-script-for-quota.sh NetBSD build fixes 2014-05-17 11:53:34 -07:00
pre-upgrade-script-for-quota.sh NetBSD build fixes 2014-05-17 11:53:34 -07:00
prot_filter.py core/various: python3 compat, prepare for python2 -> python3 2018-07-09 03:38:36 +00:00
rebalance.py core/various: python3 compat, prepare for python2 -> python3 2018-07-09 03:38:36 +00:00
run-gluster.tmpfiles.in packaging: /var/run/gluster owner gluster:gluster(0775) for statedumps 2017-04-27 15:57:15 +00:00
specgen.scm Change Copyright current year 2011-08-10 10:57:19 -07:00
stop-all-gluster-processes.sh glusterd: Gluster should keep PID file in correct location 2017-08-11 07:36:41 +00:00
stripe-merge.c remove useless if-before-free (and free-like) functions 2012-07-13 14:03:42 -07:00
volfilter.py core/various: python3 compat, prepare for python2 -> python3 2018-07-09 03:38:36 +00:00