diff --git a/systemd/README b/systemd/README
index d697cefbe229..8359530098f4 100644
--- a/systemd/README
+++ b/systemd/README
@@ -28,6 +28,17 @@ by a suitable 'preset' setting:
     If enabled, then blkmapd will be run when nfs-client.target is
     started.
 
+Another special unit is "nfs-utils.service".  This doesn't really do
+anything, but exists so that other units may declare themselves as
+"PartOf" nfs-utils.service.
+The effect of this is that
+     systemctl restart nfs-utils
+will restart all nfs-utils daemons as maybe be required during
+software update.  It isn't possible to make
+     systemctl try-restart nfs-server nfs-client.target
+do this as some daemon are included in both, and rpc.statd would
+not be restarted if nfs-server were not active (as nfs-client doesn't
+Want it - it is started by mount.nfs running start-statd).
 
 It is possible that we should have an nfs-statd.target which can
 selectively enable statd being stared by -server and sm-notify
diff --git a/systemd/nfs-blkmap.service b/systemd/nfs-blkmap.service
index 7319a88661cc..80033f2fbcf4 100644
--- a/systemd/nfs-blkmap.service
+++ b/systemd/nfs-blkmap.service
@@ -6,6 +6,8 @@ Requires=var-lib-nfs-rpc_pipefs.mount
 Requisite=nfs-blkmap.target
 After=nfs-blkmap.target
 
+PartOf=nfs-utils.service
+
 [Service]
 Type=forking
 ExecStart=/usr/sbin/blkmapd
diff --git a/systemd/nfs-idmapd.service b/systemd/nfs-idmapd.service
index 6c2e1537f064..7d0dd84d8a44 100644
--- a/systemd/nfs-idmapd.service
+++ b/systemd/nfs-idmapd.service
@@ -1,6 +1,8 @@
 [Unit]
 Description=NFSv4 ID-name mapping service
 
+PartOf=nfs-utils.service
+
 [Service]
 EnvironmentFile=-/run/sysconfig/nfs-utils
 ExecStartPre=-/usr/lib/systemd/scritps/nfs-utils_env.sh
diff --git a/systemd/nfs-mountd.service b/systemd/nfs-mountd.service
index 92e05ca309ee..90746a854b40 100644
--- a/systemd/nfs-mountd.service
+++ b/systemd/nfs-mountd.service
@@ -4,6 +4,7 @@ Requires=proc-fs-nfsd.mount
 After=proc-fs-nfsd.mount
 After=network.target
 PartOf=nfs-server.service
+PartOf=nfs-utils.service
 
 [Service]
 EnvironmentFile=-/run/sysconfig/nfs-utils
diff --git a/systemd/nfs-utils.service b/systemd/nfs-utils.service
new file mode 100644
index 000000000000..54b6314d8d52
--- /dev/null
+++ b/systemd/nfs-utils.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=NFS server and client services
+# This service should never be stopped, only restarted.
+# When it is re-started, all other services which declare
+# themselves to be "PartOf" this service will also be
+# restarted. Thus
+#   systemctl restart nfs-utils
+# will restart all daemons which are part of nfs-utils
+# and which are running.  This is useful after a software
+# update.
+
+# This is a "service" rather than "target" so that we
+# don't need to say "systemctl restart nfs-utils.target".
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/true
diff --git a/systemd/rpc-gssd.service b/systemd/rpc-gssd.service
index 8778c3ef651b..3982985762ea 100644
--- a/systemd/rpc-gssd.service
+++ b/systemd/rpc-gssd.service
@@ -5,6 +5,8 @@ After=var-lib-nfs-rpc_pipefs.mount
 
 ConditionPathExists=/etc/krb5.keytab
 
+PartOf=nfs-utils.service
+
 [Service]
 EnvironmentFile=-/run/sysconfig/nfs-utils
 ExecStartPre=-/usr/lib/systemd/scritps/nfs-utils_env.sh
diff --git a/systemd/rpc-statd-notify.service b/systemd/rpc-statd-notify.service
index 9d972fc7753a..532354d64fa0 100644
--- a/systemd/rpc-statd-notify.service
+++ b/systemd/rpc-statd-notify.service
@@ -8,6 +8,8 @@ After=network-online.target nss-lookup.target
 # tell clients that it has restarted.
 After=nfs-server.service
 
+PartOf=nfs-utils.service
+
 [Service]
 EnvironmentFile=-/run/sysconfig/nfs-utils
 ExecStartPre=/usr/lib/systemd/scritps/nfs-utils_env.sh
diff --git a/systemd/rpc-statd.service b/systemd/rpc-statd.service
index 04962e542fbc..88d2527cae9d 100644
--- a/systemd/rpc-statd.service
+++ b/systemd/rpc-statd.service
@@ -4,6 +4,8 @@ DefaultDependencies=no
 Requires=nss-lookup.target rpcbind.target
 After=network.target nss-lookup.target rpcbind.target
 
+PartOf=nfs-utils.service
+
 [Service]
 EnvironmentFile=-/run/sysconfig/nfs-utils
 ExecStartPre=-/usr/lib/systemd/scritps/nfs-utils_env.sh
diff --git a/systemd/rpc-svcgssd.service b/systemd/rpc-svcgssd.service
index 036ec579bfc1..6bd45884d991 100644
--- a/systemd/rpc-svcgssd.service
+++ b/systemd/rpc-svcgssd.service
@@ -3,6 +3,7 @@ Description=RPC security service for NFS server
 Requires=var-lib-nfs-rpc_pipefs.mount
 After=var-lib-nfs-rpc_pipefs.mount
 PartOf=nfs-server.service
+PartOf=nfs-utils.service
 
 After=gssproxy.service
 ConditionPathExists=|!@localstatedir@/run/gssproxy.pid







From 30b27a718632e9d24c479921b116d2c3958a3fc2 Mon Sep 17 00:00:00 2001
From: Neil Brown <neilb@suse.de>
Date: Wed, 5 Feb 2014 16:36:21 +1100
Subject: [PATCH] systemd: tidy up DefaultDependencies

DefaultDependencies should be "yes" (the default) for things
needed only be the NFS server, as that is a service that doesn't
need to start early.

DefaultDependencies should be "no" for things needed to mount an
NFS filesystem, and filesystems are mounted before basic.target.
To ensure these services are shut down in a timely fashion, they
must Conflict with systemd.umount so they are shutdown when everything
is unmounted.

Signed-off-by: NeilBrown <neilb@suse.de>

diff --git a/systemd/nfs-blkmap.service b/systemd/nfs-blkmap.service
index 80033f2fbcf4..4b74e9f61454 100644
--- a/systemd/nfs-blkmap.service
+++ b/systemd/nfs-blkmap.service
@@ -1,5 +1,7 @@
 [Unit]
 Description=pNFS block layout mapping daemon
+DefaultDependencies=no
+Conflicts=umount.target
 After=var-lib-nfs-rpc_pipefs.mount
 Requires=var-lib-nfs-rpc_pipefs.mount
 
diff --git a/systemd/nfs-server.service b/systemd/nfs-server.service
index 6ba2fc0f346e..5779fd39ed34 100644
--- a/systemd/nfs-server.service
+++ b/systemd/nfs-server.service
@@ -1,6 +1,5 @@
 [Unit]
 Description=NFS server and services
-DefaultDependencies=no
 Requires= network.target proc-fs-nfsd.mount rpcbind.target
 Requires= nfs-mountd.service
 Wants=rpc-statd.service nfs-idmapd.service rpc-gssd.service rpc-svcgssd.service
diff --git a/systemd/proc-fs-nfsd.mount b/systemd/proc-fs-nfsd.mount
index f44d52f3d67b..931a5ceeb055 100644
--- a/systemd/proc-fs-nfsd.mount
+++ b/systemd/proc-fs-nfsd.mount
@@ -1,6 +1,5 @@
 [Unit]
 Description=NFSD configuration filesystem
-DefaultDependencies=no
 
 [Mount]
 What=nfsd
diff --git a/systemd/rpc-gssd.service b/systemd/rpc-gssd.service
index 3982985762ea..375792804247 100644
--- a/systemd/rpc-gssd.service
+++ b/systemd/rpc-gssd.service
@@ -1,5 +1,7 @@
 [Unit]
 Description=RPC security service for NFS client and server
+DefaultDependencies=no
+Conflicts=umount.target
 Requires=var-lib-nfs-rpc_pipefs.mount
 After=var-lib-nfs-rpc_pipefs.mount
 
diff --git a/systemd/rpc-statd-notify.service b/systemd/rpc-statd-notify.service
index 532354d64fa0..7742ac8c5d9a 100644
--- a/systemd/rpc-statd-notify.service
+++ b/systemd/rpc-statd-notify.service
@@ -1,6 +1,5 @@
 [Unit]
 Description=Notify NFS peers of a restart
-DefaultDependencies=no
 Requires=network-online.target
 After=network-online.target nss-lookup.target
 
diff --git a/systemd/rpc-statd.service b/systemd/rpc-statd.service
index 88d2527cae9d..3f6cda16accd 100644
--- a/systemd/rpc-statd.service
+++ b/systemd/rpc-statd.service
@@ -1,6 +1,7 @@
 [Unit]
 Description=NFS status monitor for NFSv2/3 locking.
 DefaultDependencies=no
+Conflicts=umount.target
 Requires=nss-lookup.target rpcbind.target
 After=network.target nss-lookup.target rpcbind.target
 
diff --git a/systemd/var-lib-nfs-rpc_pipefs.mount b/systemd/var-lib-nfs-rpc_pipefs.mount
index cd614cf49f00..33c5db65aa38 100644
--- a/systemd/var-lib-nfs-rpc_pipefs.mount
+++ b/systemd/var-lib-nfs-rpc_pipefs.mount
@@ -1,6 +1,7 @@
 [Unit]
 Description=RPC Pipe File System
 DefaultDependencies=no
+Conflicts=umount.target
 
 [Mount]
 What=sunrpc
