summaryrefslogtreecommitdiff
path: root/systemd/nfs-server.service
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2016-08-22 08:50:37 -0400
committerSteve Dickson <steved@redhat.com>2016-08-22 08:50:37 -0400
commit4776bd0599420f9d073c9e2601ed438062dccd19 (patch)
treee2984e861f55387286a99669ccb031385b07d3b3 /systemd/nfs-server.service
parent0386fc1757838a096ae318347bc0bbd3ba94570b (diff)
downloadnfs-utils-4776bd0599420f9d073c9e2601ed438062dccd19.tar.gz
systemd: improve ordering between nfs-server and various mounts
Commit: 1e41488f428c ("systemd: Order NFS server before client") added an ordering dependency between network mounts and nfs-server. This is good for loop-back NFS mounts as it ensures the server will remain until after the mountpoint is unmounted. However is is bad for _net mounts (such as those via iSCSI) which are being NFS exported. nfs-server needs to be start *after* exported filesystems are mounted, and *before* NFS filesystems are mounted. systemd isn't able to make this distinction natively, so we need to help it. This patch adds a systemd generator which creates a drop-in for nfs-server.services so that it is started "Before" any "nfs" or "nfs4" mount, and so that it has a "RequiresMountsFor" dependency on any exported filesystem. This creates the required ordering. Note that if you try to export an "nfs" mount, systemd will detect an ordering loop and will refused to start the nfs server. This is probably the correct thing to do. This patch also removes the ordering dependency with remote-fs-pre.target which the above-mentioned commit added. It is no longer needed. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'systemd/nfs-server.service')
-rw-r--r--systemd/nfs-server.service3
1 files changed, 0 insertions, 3 deletions
diff --git a/systemd/nfs-server.service b/systemd/nfs-server.service
index 2ccdc63..196c818 100644
--- a/systemd/nfs-server.service
+++ b/systemd/nfs-server.service
@@ -16,9 +16,6 @@ Before= rpc-statd-notify.service
Wants=auth-rpcgss-module.service
After=rpc-gssd.service gssproxy.service rpc-svcgssd.service
-# start/stop server before/after client
-Before=remote-fs-pre.target
-
Wants=nfs-config.service
After=nfs-config.service