Bug 798234

Summary: NFS mount occurs before nfs-lock.service
Product: [Fedora] Fedora Reporter: Remi Collet <fedora>
Component: systemdAssignee: systemd-maint
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: johannbg, metherid, mschmidt, notting, plautrba, systemd-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-28 12:04:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Remi Collet 2012-02-28 11:54:32 UTC
AS NFS mount occurs before nfs-lock.service, each mount launch a rpc.statd process

$ grep nfs /etc/fstab
somewhere:/home/remi	/home/remi		nfs	x-systemd.automount 0 0
somewhere:/home/nelly	/home/nelly		nfs	x-systemd.automount 0 0
somewhere:/app		/app			nfs	x-systemd.automount 0 0
somewhere:/savliv	/savliv			nfs	x-systemd.automount 0 0 

# ps -fu rpcuser
UID        PID  PPID  C STIME TTY          TIME CMD
rpcuser   1068     1  0 10:31 ?        00:00:00 rpc.statd --no-notify
rpcuser   1072     1  0 10:31 ?        00:00:00 rpc.statd --no-notify
rpcuser   1073     1  0 10:31 ?        00:00:00 rpc.statd --no-notify
rpcuser   1097     1  0 10:31 ?        00:00:00 rpc.statd --no-notify
rpcuser   1103     1  0 10:31 ?        00:00:00 /sbin/rpc.statd

# systemctl status app.mount
app.mount - /app
	  Loaded: loaded
	  Active: active (mounted) since Tue, 28 Feb 2012 10:30:54 +0100; 1h 47min ago
	   Where: /app
	    What: somewhere:/app/
	 Process: 1057 ExecMount=/bin/mount /app (code=exited, status=0/SUCCESS)
	  CGroup: name=systemd:/system/app.mount
		  └ 1072 rpc.statd --no-notify

=> I think this rpc.statd is launched by mount => start-statd

# systemctl status nfs-lock.service
nfs-lock.service - NFS file locking service.
	  Loaded: loaded (/lib/systemd/system/nfs-lock.service; enabled)
	  Active: active (running) since Tue, 28 Feb 2012 10:30:54 +0100; 1h 47min ago
	 Process: 1102 ExecStart=/sbin/rpc.statd $STATDARG (code=exited, status=0/SUCCESS)
	 Process: 1099 ExecStartPre=/usr/lib/nfs-utils/scripts/nfs-lock.preconfig (code=exited, status=0/SUCCESS)
	Main PID: 1103 (rpc.statd)
	  CGroup: name=systemd:/system/nfs-lock.service
		  └ 1103 /sbin/rpc.statd


With, in remote-fs-pre.target
Wants=nfs-lock.service
After=network.target nfs-lock.service

This change seems to improve things, except when mount is launch "before" network start (which is another bug #773078 or #773433)

Note : I don't use NetworkManager, but standard network service for lo and eth0

Comment 1 Michal Schmidt 2012-02-28 12:04:13 UTC
This needs to be fixed in the nfs-utils units.

*** This bug has been marked as a duplicate of bug 786050 ***