From 01ad8e07005d38c864d8744606aff0ba7edad2a2 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Tue, 15 May 2012 14:22:42 -0400 Subject: [PATCH] Split out NFS server daemons into individual service files (bz 769879) Signed-off-by: Steve Dickson --- nfs-idmap.service | 7 +++---- nfs-mountd.service | 13 +++++++++++++ nfs-rquotad.service | 13 +++++++++++++ nfs-server.postconfig | 3 --- nfs-server.service | 9 ++++----- nfs-utils.spec | 7 ++++++- nfs.target | 7 +++++++ 7 files changed, 46 insertions(+), 13 deletions(-) create mode 100644 nfs-mountd.service create mode 100644 nfs-rquotad.service create mode 100644 nfs.target diff --git a/nfs-idmap.service b/nfs-idmap.service index 53485f9..872ae09 100644 --- a/nfs-idmap.service +++ b/nfs-idmap.service @@ -1,8 +1,7 @@ [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 +BindTo=nfs-server.service +After=nfs-server.service [Service] Type=forking @@ -11,4 +10,4 @@ EnvironmentFile=-/etc/sysconfig/nfs ExecStart=/usr/sbin/rpc.idmapd $RPCIDMAPDARGS [Install] -WantedBy=multi-user.target +WantedBy=nfs.target diff --git a/nfs-mountd.service b/nfs-mountd.service new file mode 100644 index 0000000..3b92ed8 --- /dev/null +++ b/nfs-mountd.service @@ -0,0 +1,13 @@ +[Unit] +Description=NFS Mount Daemon +BindTo=nfs-server.service +After=nfs-server.service + +[Service] +Type=forking +EnvironmentFile=-/etc/sysconfig/nfs +ExecStart=/usr/sbin/rpc.mountd $RPCMOUNTDARGS +StandardError=syslog+console + +[Install] +WantedBy=nfs.target diff --git a/nfs-rquotad.service b/nfs-rquotad.service new file mode 100644 index 0000000..c305aaa --- /dev/null +++ b/nfs-rquotad.service @@ -0,0 +1,13 @@ +[Unit] +Description=NFS Remote Quota Server +BindTo=nfs-server.service +After=nfs-server.service + +[Service] +Type=forking +StandardError=syslog+console +EnvironmentFile=-/etc/sysconfig/nfs +ExecStart=-/usr/sbin/rpc.rquotad $RPCRQUOTADOPTS + +[Install] +WantedBy=nfs.target diff --git a/nfs-server.postconfig b/nfs-server.postconfig index 0cf7024..6ff8a59 100644 --- a/nfs-server.postconfig +++ b/nfs-server.postconfig @@ -2,9 +2,6 @@ . /etc/sysconfig/nfs -# Tell idmapd the server is up and running -/usr/bin/pkill -HUP rpc.idmapd - # # Enabled the RDMA server support if configured to do so. # diff --git a/nfs-server.service b/nfs-server.service index f8a26e6..95ade87 100644 --- a/nfs-server.service +++ b/nfs-server.service @@ -1,18 +1,17 @@ [Unit] Description=NFS Server Requires=proc-fs-nfsd.mount var-lib-nfs-rpc_pipefs.mount rpcbind.service -After=network.target named.service rpcbind.service proc-fs-nfsd.mount var-lib-nfs-rpc_pipefs.mount +Requires=nfs-idmap.service nfs-mountd.service nfs-rquotad.service +After=network.target named.service [Service] -Type=forking +Type=oneshot +RemainAfterExit=yes StandardError=syslog+console EnvironmentFile=-/etc/sysconfig/nfs ExecStartPre=/usr/lib/nfs-utils/scripts/nfs-server.preconfig -ExecStartPre=-/usr/sbin/rpc.rquotad $RPCRQUOTADOPTS ExecStartPre=/usr/sbin/exportfs -r ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS ${RPCNFSDCOUNT} -ExecStartPost=/usr/sbin/rpc.mountd $RPCMOUNTDOPTS -ExecStartPost=/usr/sbin/rpc.idmapd $RPCIDMAPDARGS ExecStartPost=-/usr/lib/nfs-utils/scripts/nfs-server.postconfig ExecStop=/usr/sbin/rpc.nfsd 0 ExecStopPost=/usr/sbin/exportfs -f diff --git a/nfs-utils.spec b/nfs-utils.spec index 8166609..173cf4c 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -17,7 +17,11 @@ Source12: nfs-secure.service Source13: nfs-secure-server.service Source14: nfs-server.service Source15: nfs-blkmap.service -%define nfs_services %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} +Source16: nfs-rquotad.service +Source17: nfs-mountd.service +Source18: nfs-idmap.service +Source19: nfs.target +%define nfs_services %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE17} %{SOURCE18} %{SOURCE19} Source20: var-lib-nfs-rpc_pipefs.mount Source21: proc-fs-nfsd.mount @@ -283,6 +287,7 @@ fi %changelog * Tue May 15 2012 Steve Dickson 1.2.6-0 - Update to the latest upstream release: nfs-utils-1.2.6 +- Split out NFS server daemons into individual service files (bz 769879) * Thu May 3 2012 Steve Dickson 1.2.5-16 - Update to the latest RC release: nfs-utils-1.2.6-rc7 diff --git a/nfs.target b/nfs.target new file mode 100644 index 0000000..6c3262a --- /dev/null +++ b/nfs.target @@ -0,0 +1,7 @@ +[Unit] +Description=Network File System Server +Requires=var-lib-nfs-rpc_pipefs.mount proc-fs-nfsd.mount rpcbind.service +After=network.target named.service + +[Install] +WantedBy=multi-user.target