From 8cb4991d748d100edb3f9c9cb2917fb7a18fc5e1 Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Sat, 3 Jun 2017 12:36:19 +0530 Subject: systemd: add gluster-blockd.sysconfig template one can edit various input options to gluster-blockd daemon via /etc/sysconfig/gluster-blockd Change-Id: I720130d6b6599a79d193c5cbfff18921ffb07156 Signed-off-by: Prasanna Kumar Kalever --- systemd/Makefile.am | 10 +++++++++- systemd/gluster-blockd.service.in | 4 +++- systemd/gluster-blockd.sysconfig | 14 ++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 systemd/gluster-blockd.sysconfig (limited to 'systemd') 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="" -- cgit