From: Steve Dickson <steved@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: [PATCH 6/6] exportd: systemd unit files
Date: Thu, 18 Feb 2021 17:54:50 -0500 [thread overview]
Message-ID: <20210218225450.674466-7-steved@redhat.com> (raw)
In-Reply-To: <20210218225450.674466-1-steved@redhat.com>
Created two new systemd unit services
based on nfs-mountd and nfs-service
Signed-off-by: Steve Dickson <steved@redhat.com>
---
systemd/Makefile.am | 4 +++-
systemd/nfsv4-exportd.service | 12 ++++++++++++
systemd/nfsv4-server.service | 31 +++++++++++++++++++++++++++++++
3 files changed, 46 insertions(+), 1 deletion(-)
create mode 100644 systemd/nfsv4-exportd.service
create mode 100644 systemd/nfsv4-server.service
diff --git a/systemd/Makefile.am b/systemd/Makefile.am
index 75cdd9f..5251f23 100644
--- a/systemd/Makefile.am
+++ b/systemd/Makefile.am
@@ -17,7 +17,9 @@ unit_files = \
if CONFIG_NFSV4
unit_files += \
- nfs-idmapd.service
+ nfs-idmapd.service \
+ nfsv4-exportd.service \
+ nfsv4-server.service
endif
if CONFIG_NFSV41
diff --git a/systemd/nfsv4-exportd.service b/systemd/nfsv4-exportd.service
new file mode 100644
index 0000000..11d663a
--- /dev/null
+++ b/systemd/nfsv4-exportd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=NFSv4 Mount Daemon
+DefaultDependencies=no
+Requires=proc-fs-nfsd.mount
+Wants=network-online.target
+After=proc-fs-nfsd.mount
+After=network-online.target local-fs.target
+BindsTo=nfsv4-server.service
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/nfsv4.exportd
diff --git a/systemd/nfsv4-server.service b/systemd/nfsv4-server.service
new file mode 100644
index 0000000..6497568
--- /dev/null
+++ b/systemd/nfsv4-server.service
@@ -0,0 +1,31 @@
+[Unit]
+Description=NFSv4 server and services
+DefaultDependencies=no
+Requires=network.target proc-fs-nfsd.mount
+Requires=nfsv4-exportd.service
+Wants=network-online.target
+Wants=nfs-idmapd.service
+Wants=nfsdcld.service
+
+After=network-online.target local-fs.target
+After=proc-fs-nfsd.mount nfsv4-exportd.service
+After=nfs-idmapd.service
+After=nfsdcld.service
+
+# GSS services dependencies and ordering
+Wants=auth-rpcgss-module.service
+After=rpc-gssd.service gssproxy.service rpc-svcgssd.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStartPre=-/usr/sbin/exportfs -r
+ExecStart=/usr/sbin/rpc.nfsd -N 3
+ExecStop=/usr/sbin/rpc.nfsd 0
+ExecStopPost=/usr/sbin/exportfs -au
+ExecStopPost=/usr/sbin/exportfs -f
+
+ExecReload=-/usr/sbin/exportfs -r
+
+[Install]
+WantedBy=multi-user.target
--
2.29.2
next prev parent reply other threads:[~2021-02-18 22:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-18 22:54 [PATCH 0/6 V3] The NFSv4 only mounting daemon Steve Dickson
2021-02-18 22:54 ` [PATCH 1/6] exportd: the initial shell of the v4 export support Steve Dickson
2021-02-18 22:54 ` [PATCH 2/6] exportd: Moved cache upcalls routines into libexport.a Steve Dickson
2021-02-18 22:54 ` [PATCH 3/6] exportd: multiple threads Steve Dickson
2021-02-18 22:54 ` [PATCH 4/6] exportd/exportfs: Add the state-directory-path option Steve Dickson
2021-02-18 22:54 ` [PATCH 5/6] exportd: Enabled junction support Steve Dickson
2021-02-18 22:54 ` Steve Dickson [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-02-17 19:42 [PATCH 0/6 V2] exportd: The NFSv4 only mounting daemon Steve Dickson
2021-02-17 19:42 ` [PATCH 6/6] exportd: systemd unit files Steve Dickson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210218225450.674466-7-steved@redhat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox