rpc-statd-notify.service was started on my Fedora 28 Workstation laptop.
This appears to be only because
nfs-client.target is enabled on my laptop. It is quite plausible I enabled that at some point in the past. So that answers the main question I had...
But then I notice that by contrast,
rpc.statd is not started on my system. Wouldn't this cause a problem?
$ systemctl status rpc-statd-notify ● rpc-statd-notify.service - Notify NFS peers of a restart Loaded: loaded (/usr/lib/systemd/system/rpc-statd-notify.service; static; vendor preset: disabled) Active: active (exited) since Tue 2018-05-08 08:02:24 BST; 4h 55min ago Process: 1451 ExecStart=/usr/sbin/sm-notify $SMNOTIFYARGS (code=exited, status=0/SUCCESS) May 08 08:02:23 alan-laptop systemd: Starting Notify NFS peers of a restart... May 08 08:02:24 alan-laptop sm-notify: Version 3.1.1 starting May 08 08:02:24 alan-laptop systemd: Started Notify NFS peers of a restart. $ systemctl list-dependencies --reverse rpc-statd-notify rpc-statd-notify.service ● ├─nfs-server.service ● ├─nfs-utils.service ● └─nfs-client.target ● ├─multi-user.target ● └─remote-fs.target [...] $ systemctl status nfs-client.target ● nfs-client.target - NFS client services Loaded: loaded (/usr/lib/systemd/system/nfs-client.target; disabled; vendor preset: disabled) Active: active since Tue 2018-05-08 08:01:52 BST; 5h 28min ago May 08 08:01:52 alan-laptop systemd: Reached target NFS client services.
File locks are not part of persistent file system state. Lock state is thus lost when a host reboots.
Network file systems must also detect when lock state is lost because a remote host has rebooted. After an NFS client reboots, an NFS server must release all file locks held by applications that were running on that client. After a server reboots, a client must remind the server of file locks held by applications running on that client.
For NFS version 2 and version 3, the Network Status Monitor protocol (or NSM for short) is used to notify NFS peers of reboots. On Linux, two separate user-space components constitute the NSM service:
A helper program that notifies NFS peers after the local system reboots
A daemon that listens for reboot notifications from other hosts, and manages the list of hosts to be notified when the local system reboots
The local NFS lock manager alerts its local rpc.statd of each remote peer that should be monitored. When the local system reboots, the sm- notify command notifies the NSM service on monitored peers of the reboot. When a remote reboots, that peer notifies the local rpc.statd, which in turn passes the reboot notification back to the local NFS lock manager.
I am left wondering, if there is a reason why Fedora would default to supporting rebooting an NFSv3 client system, but not support rebooting the server system? I.e. rebooting the server will break the locks held by the client. It sounds like it could be an annoying oversight.