How To Restart Linux NFS Server Properly When Network Become Unavailable

Q. 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? Forceful umount command result into more problems such as unresponsive NFS server and cold reboot only solves my problem.

A. The simplest and easiest way to stop and start (no restart option) NFS under RHEL / CentOS / Fedora Linux is use init script located at /etc/init.d/ directory.

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

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post: How To: Updating Ubuntu Linux 8.04 Kernel

Next post: OpenBSD Set Date and Time