summaryrefslogtreecommitdiffstats
path: root/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'systemd')
-rw-r--r--systemd/Makefile.am10
-rw-r--r--systemd/gluster-blockd.service.in4
-rw-r--r--systemd/gluster-blockd.sysconfig14
3 files changed, 26 insertions, 2 deletions
diff --git a/systemd/Makefile.am b/systemd/Makefile.am
index 605e1f8..2cdda4c 100644
--- a/systemd/Makefile.am
+++ b/systemd/Makefile.am
@@ -2,9 +2,17 @@ DISTCLEANFILES = Makefile.in gluster-blockd.service
CLEANFILES = *~ gluster-blockd.service
-EXTRA_DIST = gluster-blockd.service.in
+EXTRA_DIST = gluster-blockd.service.in gluster-blockd.sysconfig
if USE_SYSTEMD
# systemddir is already defined through configure.ac
systemd_DATA = gluster-blockd.service
endif
+
+install-data-local:
+ $(MKDIR_P) $(DESTDIR)${sysconfigdir}; \
+ $(INSTALL_DATA) gluster-blockd.sysconfig \
+ $(DESTDIR)${sysconfigdir}/gluster-blockd;
+
+uninstall-local:
+ rm -f $(DESTDIR)${sysconfigdir}/gluster-blockd
diff --git a/systemd/gluster-blockd.service.in b/systemd/gluster-blockd.service.in
index 8970154..7a9b759 100644
--- a/systemd/gluster-blockd.service.in
+++ b/systemd/gluster-blockd.service.in
@@ -5,7 +5,9 @@ After=rpcbind.service iscsid.service target.service tcmu-runner.service
[Service]
Type=simple
-ExecStart=@prefix@/sbin/gluster-blockd
+Environment="GB_GLFS_LRU_COUNT=5"
+EnvironmentFile=-@sysconfigdir@/gluster-blockd
+ExecStart=@prefix@/sbin/gluster-blockd --glfs-lru-count $GB_GLFS_LRU_COUNT $GB_EXTRA_ARGS
KillMode=process
[Install]
diff --git a/systemd/gluster-blockd.sysconfig b/systemd/gluster-blockd.sysconfig
new file mode 100644
index 0000000..cb778d2
--- /dev/null
+++ b/systemd/gluster-blockd.sysconfig
@@ -0,0 +1,14 @@
+# These options are used by the systemd gluster-blockd.service
+# Any changes done here will reflect in the way systemd exec gluster-blockd
+# with command arguments. See "gluster-blockd --help" output for defaults
+# and possible values.
+
+
+# The default cache capacity is 5 i.e there can be a max of five glfs
+# entries in the lru cache, anything more will lead to release/free of
+# least recently used object.
+#GB_GLFS_LRU_COUNT=5
+
+
+# Expert use only, just incase if we have any extra args to pass for daemon
+#GB_EXTRA_ARGS=""