How To Restart Linux NFS Server Properly When Network Become Unavailable

How do I restart NFS server when network link goes down between two servers or NFS client / server under CentOS 4.x / RHEL / CentOS Linux 5.x?

The simplest and easiest way to stop and start (do not use restart option) NFS server under RHEL / CentOS / Fedora / Red Hat Linux is to use the init script located at /etc/init.d/ directory. Forceful umount command may result into more problems such as unresponsive NFS server and cold reboot may only solves the problem.

Stop and Start NFS and Related Services

For example type the following command to stop NFS server:

WARNING! Using restart option (i.e. service nfs restart) may crash / freeze your Linux computer if executed.

# service nfslock stop
# service nfs stop
# service portmap stop
# umount /proc/fs/nfsd

Now start service in following order:
# service portmap start
# service nfs start
# service nfslock start
# mount -t nfsd nfsd /proc/fs/nfsd

🐧 If you liked this page, please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
1 comment… add one
  • Pavan Devarakonda Sep 5, 2012 @ 18:32

    How do we ensure that nfs service is working fine or having some errors in the configuration?

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.