I installed the package nfs-utils and tried it via:
# mount -t nfs server:/mnt /mnt
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
Ok, probably need to start that - via systemd - right?
# systemctl start nfs-lock.service
Job failed. See system journal and 'systemctl status' for details.
# journalctl
Jun 15 23:22:18 host rpc.statd[24339]: Version 1.2.6 starting
Jun 15 23:22:18 host rpc.statd[24339]: Opening /var/run/rpc.statd.pid failed:
Permission denied
[..]
Jun 15 23:22:18 host systemd[1]: nfs-lock.service: control process exited,
code=exited status=1
Jun 15 23:22:18 host systemd[1]: Unit nfs-lock.service entered failed state.
Looks like a SELinux related problem?
Jun 15 23:22:18 host setroubleshoot[3211]: analyze_avc()
avc=scontext=system_u:system_r:rpcd_t:s0
tcontext=unconfined_u:object_r:var_run_t:s0
access=['unlink'] tclass=file tpath=rpc.statd.pid
Jun 15 23:22:18 host setroubleshoot[3211]: SELinux is preventing
/usr/sbin/rpc.statd from unlink access on the file rpc.statd.pid.
Jun 15 23:22:18 host setroubleshoot[3211]: analyze_avc()
avc=scontext=system_u:system_r:rpcd_t:s0
tcontext=unconfined_u:object_r:var_run_t:s0
access=['write'] tclass=file tpath=rpc.statd.pid
Jun 15 23:22:18 host setroubleshoot[3211]: SELinux is preventing
/usr/sbin/rpc.statd from write access on the file rpc.statd.pid.
Ok - now the question is: what SELinux configuration or what file label do I have to change?
# systemctl status nfs-lock.service
nfs-lock.service - NFS file locking service.
Loaded: loaded (/usr/lib/systemd/system/nfs-lock.service; enabled)
Active: failed (Result: exit-code) since Fri, 15 Jun 2012 23:22:18 +0200;
13min ago
Process: 24338 ExecStart=/sbin/rpc.statd $STATDARG
(code=exited, status=1/FAILURE)
Process: 24334 ExecStartPre=/usr/lib/nfs-utils/scripts/nfs-lock.preconfig
(code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/nfs-lock.service
Is a package missing - or am I using the wrong service?