How to start rpc.statd and nfslock as independent service without the need of starting nfs.service ?
Issue
- After server reboot there is alert received for
statdservice not running.
]# ls -ld /usr/lib/systemd/system/nfs-lock.service
lrwxrwxrwx 1 root root 17 Sep 13 16:05 /usr/lib/systemd/system/nfs-lock.service -> rpc-statd.service
-
Both
rpc-statdandnfslockservices are configured as static by default. -
So at the time of system restart as
rpc-statdandnfslockservice are static and not enabled, there is an alert in monitoring system thatstatdis not working. Now we want to start onlyrpc-statdandnfslockservice and do not want to startnfsservice at the time of server restart. -
Can we achieve it?
# systemctl list-unit-files | grep -i nfslock
nfslock.service static
# systemctl list-unit-files | grep -i rpc-statd
rpc-statd-notify.service static
rpc-statd.service static
# systemctl list-unit-files | grep -i nfs.service
nfs.service disabled
# systemctl list-unit-files | grep -i nfs-server
nfs-server.service disabled
Environment
- Red Hat Enterprise Linux 7
- Systemd
- Network File System
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
