summaryrefslogtreecommitdiffstats
path: root/extras/systemd
diff options
context:
space:
mode:
authorHendrik Visage <hvjunk@gmail.com>2017-05-19 12:21:37 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2017-06-20 12:42:01 +0000
commit3183ca1bdee9cb0af22c017e3c610add8ff2b405 (patch)
tree7fc3036b96154701853ce8826bf129a71ca42af3 /extras/systemd
parenta052b413242783f39cb3312a6a02bdd025b10f0c (diff)
scripts/shared_storage : systemd helper scripts to mount shared storage post reboot
Reported-by: Hendrik Visage <hvjunk@gmail.com> Change-Id: Ibcff56b00f45c8af54c1ae04974267c2180f5f63 BUG: 1452527 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: https://review.gluster.org/17339 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'extras/systemd')
-rw-r--r--extras/systemd/Makefile.am6
-rw-r--r--extras/systemd/glusterfssharedstorage.service.in12
2 files changed, 15 insertions, 3 deletions
diff --git a/extras/systemd/Makefile.am b/extras/systemd/Makefile.am
index 5b9b117efaf..3988b40bce6 100644
--- a/extras/systemd/Makefile.am
+++ b/extras/systemd/Makefile.am
@@ -1,9 +1,9 @@
-CLEANFILES = glusterd.service glustereventsd.service
-EXTRA_DIST = glusterd.service.in glustereventsd.service.in
+CLEANFILES = glusterd.service glustereventsd.service glusterfssharedstorage.service
+EXTRA_DIST = glusterd.service.in glustereventsd.service.in glusterfssharedstorage.service.in
if USE_SYSTEMD
# systemddir is already defined through configure.ac
-systemd_DATA = glusterd.service
+systemd_DATA = glusterd.service glusterfssharedstorage.service
if BUILD_EVENTS
systemd_DATA += glustereventsd.service
diff --git a/extras/systemd/glusterfssharedstorage.service.in b/extras/systemd/glusterfssharedstorage.service.in
new file mode 100644
index 00000000000..3bceba84215
--- /dev/null
+++ b/extras/systemd/glusterfssharedstorage.service.in
@@ -0,0 +1,12 @@
+[Unit]
+Description=Mount glusterfs sharedstorage
+Requires=glusterd.service remote-fs-pre.target local-fs.target
+
+[Service]
+ExecStart=@GLUSTERFS_LIBEXECDIR@/mount-shared-storage.sh
+Restart=on-failure
+RestartSec=3
+RestartForceExitStatus=1
+
+[Install]
+WantedBy=multi-user.target