How to start rpc.statd and nfslock as independent service without the need of starting nfs.service ?

Solution In Progress - Updated -

Issue

  • After server reboot there is alert received for statd service 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-statd and nfslock services are configured as static by default.

  • So at the time of system restart as rpc-statd and nfslock service are static and not enabled, there is an alert in monitoring system that statd is not working. Now we want to start only rpc-statd and nfslock service and do not want to start nfs service 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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content