This repository has been archived by the owner on Nov 11, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge NFS client services from jackb80.
I've fixed the units to match our policies and Fedora ones better but would have to do some testing.
- Loading branch information
Showing
6 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=Dependencies for NFSv3 mounts | ||
Requires=rpc.statd.service | ||
Wants=sm-notify.service | ||
After=rpc.statd.service sm-notify.service | ||
Before=remote-fs.target | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=Dependencies for NFSv4 mounts | ||
Requires=rpc.idmapd.service | ||
Requires=rpc.statd.service | ||
Wants=sm-notify.service | ||
Wants=rpc.gssd.service | ||
After=rpc.idmapd.service rpc.statd.service sm-notify.service rpc.gssd.service | ||
Before=remote-fs.target | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Unit] | ||
Description=NFS rpcsec_gss daemon | ||
Requires=var-lib-nfs-rpc_pipefs.mount | ||
After=syslog.target var-lib-nfs-rpc_pipefs.mount | ||
|
||
[Service] | ||
ExecStart=/usr/sbin/rpc.gssd -f | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=NFSv4 ID-name mapping daemon | ||
Wants=var-lib-nfs-rpc_pipefs.mount | ||
Requires=network.target var-lib-nfs-rpc_pipefs.mount | ||
After=syslog.target network.target named.service | ||
|
||
[Service] | ||
ExecStart=/usr/sbin/rpc.idmapd -f | ||
|
||
[Install] | ||
WantedBy=nfsmount.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=NFS file locking service | ||
After=syslog.target network.target rpcbind.service | ||
|
||
[Service] | ||
ExecStart=/sbin/rpc.statd --no-notify -d -F | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[Unit] | ||
Description=NFS reboot notification service | ||
After=syslog.target network.target rpcbind.service | ||
|
||
[Service] | ||
ExecStart=/usr/sbin/sm-notify -d |
732935c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My test system has a NFS 4 client so that's what I developed the original files for. I've got a few questions about the modifications.
sm-notify isn't a daemon - it runs once at bootup to notify the other members of the network and then exits. Shouldn't that be Type=oneshot?
Do all of those files actually need [Install] sections? Most of them are purely dependencies of the services that a user would actually want (nfs3_client.target or nfs4_client.target)?
What is the reasoning for making nfs3_client.target and nfs4_client.target WantedBy=multi-user.target instead of remote-fs.target?
732935c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd appreciate an information whether it still works then. I've got only NFS3 to test it on.
Thanks, fixed
sm-notify
.Type=oneshot
is not exactly that because it assumes starting dependent services (likenfs3-client
) should be delayed until it exits.Type=simple
withRemainAfterExit=yes
is better.Well, I assumed user can want to choose the services to run him-/herself. NFS client targets are just for those who don't want to think about it.
About
remote-fs.target
, I just need to check that first.remote-fs-pre.target
could be better (or both).732935c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I took a closer look and:
sm-notify
is now ofType=oneshot
,multi-user.target
.remote-fs.target
is handled throughBefore=
. That's simply becauseWantedBy=
doesn't imply any ordering and we want NFS services started before mounting.