From: Yongcheng Yang <yoyang@redhat.com>
To: Steve Dickson <steved@redhat.com>
Cc: Linux NFS Mailing list <linux-nfs@vger.kernel.org>,
Yongcheng Yang <yoyang@redhat.com>,
Petr Pisar <ppisar@redhat.com>
Subject: [PATCH] systemd: nfs-server.service add "Wants" dependency on rpc-rquotad.service
Date: Fri, 30 Apr 2021 14:56:01 +0800 [thread overview]
Message-ID: <20210430065601.16523-1-yoyang@redhat.com> (raw)
The RPC quota service was part of nfs-utils and started together
with nfs-server before it was splitting out from nfs-utils.
It would be convenient to preserve the behavior: Let nfs-server
start rpc-rquotad automatically.
Signed-off-by: Petr Pisar <ppisar@redhat.com>
Signed-off-by: Yongcheng Yang <yoyang@redhat.com>
---
Hi,
The rpc-rquotad.service contains "WantedBy=nfs-server.service" but it only
takes effect after "systemctl enable rpc-rquotad":
"A symbolic link is created in the .wants/ directory of each of the listed
units when this unit is installed by systemctl enable"
This is different with the previous behavior when it's not splitted.
Test logs:
~~~~~~~~~~
[root@rhel-latest ~]# systemctl is-enabled rpc-rquotad
disabled
[root@rhel-latest ~]# systemctl start nfs-server
[root@rhel-latest ~]# systemctl status rpc-rquotad
* rpc-rquotad.service - Remote quota server
Loaded: loaded (/usr/lib/systemd/system/rpc-rquotad.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: man:rpc.rquotad(8)
[root@rhel-latest ~]#
[root@rhel-latest ~]# systemctl enable rpc-rquotad
Created symlink /etc/systemd/system/multi-user.target.wants/rpc-rquotad.service -> /usr/lib/systemd/system/rpc-rquotad.service.
Created symlink /etc/systemd/system/nfs-server.service.wants/rpc-rquotad.service -> /usr/lib/systemd/system/rpc-rquotad.service.
[root@rhel-latest ~]# systemctl restart nfs-server
[root@rhel-latest ~]# systemctl status rpc-rquotad
* rpc-rquotad.service - Remote quota server
Loaded: loaded (/usr/lib/systemd/system/rpc-rquotad.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2021-04-30 02:17:33 EDT; 6s ago
Docs: man:rpc.rquotad(8)
Main PID: 5821 (rpc.rquotad)
Tasks: 1 (limit: 7971)
Memory: 12.7M
CGroup: /system.slice/rpc-rquotad.service
`-5821 /usr/sbin/rpc.rquotad
Apr 30 02:17:33 rhel-latest systemd[1]: Starting Remote quota server...
Apr 30 02:17:33 rhel-latest systemd[1]: Started Remote quota server.
[root@rhel-latest ~]#
Thanks,
Yongcheng
systemd/nfs-server.service | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/systemd/nfs-server.service b/systemd/nfs-server.service
index b432f910..16eca3f9 100644
--- a/systemd/nfs-server.service
+++ b/systemd/nfs-server.service
@@ -3,7 +3,8 @@ Description=NFS server and services
DefaultDependencies=no
Requires=network.target proc-fs-nfsd.mount
Requires=nfs-mountd.service
-Wants=rpcbind.socket network-online.target
+Wants=network-online.target
+Wants=rpcbind.socket rpc-rquotad.service
Wants=rpc-statd.service nfs-idmapd.service
Wants=rpc-statd-notify.service
Wants=nfsdcld.service
--
2.20.1
next reply other threads:[~2021-04-30 6:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-30 6:56 Yongcheng Yang [this message]
2021-05-04 3:34 ` [PATCH] systemd: nfs-server.service add "Wants" dependency on rpc-rquotad.service NeilBrown
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=20210430065601.16523-1-yoyang@redhat.com \
--to=yoyang@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=ppisar@redhat.com \
--cc=steved@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.