How To Restart Linux NFS Server Properly When Network Become Unavailable

Posted on in Categories , , , , , last updated May 3, 2017

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

This entry is 5 of 15 in the Linux / UNIX NFS File Server Tutorial series. Keep reading the rest of the series:
  1. CentOS / Redhat: Setup NFS v4.0 File Server
  2. Debian / Ubuntu Linux: Setup NFSv4 File Server
  3. Mac Os X: Mount NFS Share / Set an NFS Client
  4. RHEL: How Do I Start and Stop NFS Service?
  5. How To Restart Linux NFS Server Properly When Network Become Unavailable
  6. Linux Iptables Allow NFS Clients to Access the NFS Server
  7. Debian / Ubuntu Linux Disable / Remove All NFS Services
  8. Linux: Tune NFS Performance
  9. Mount NFS file system over a slow and busy network
  10. Linux Track NFS Directory / Disk I/O Stats
  11. Linux Disable / Remove All NFS Services
  12. Linux: NFS4 mount Error reason given by server: No such file or directory
  13. Linux NFS Mount: wrong fs type, bad option, bad superblock on fs2:/data3 Error And Solution
  14. CentOS / RHEL CacheFS: Speed Up Network File System (NFS) File Access
  15. Increase NFS Client Mount Point Security

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

1 comment

Leave a Comment