Red Hat Bugzilla – Bug 5674
NFS filesystems are mounted before NFS server is started
Last modified: 2014-03-16 22:10:13 EDT
The default RedHat 6.0 initscripts/knfsd /etc/rc.d/init.d
files are ordered so that NFS filesystems are mounted well
before the system begins its life as an NFS server. This is
probably the wrong way around.
Why? Consider what happens when you have two NFS servers
that mount each other's filesystems and that get rebooted
at the same time. In the current ordering, each can be
sitting there trying to NFS-mount filesystems from the
other; deadlock. If the NFS server was started first,
this deadlock situation wouldn't come up.
I expect that similar situations can happen with other
network filesystems, such as SMB.
NFS filesystem mounting is before server starting because
the server uses stuff that's on /usr. This probably
won't be changed without moving the NFS server stuff to
/sbin. (admittedly, running the nfs server off of NFS is
an odd case...)
I think that the better (and easier) solution is to have a new
/etc/rc.d/init.d file (and step) that mounts /usr early on if it's
not already mounted, just after the network and portmap and so on
have been started, and then move the netfs mount-everything after
the various remote filesystem servers have been started.
Bug 5674 has been closed as Red Hat Linux 6.0 is not supported by Red Hat any
longer, and the problem is not one that seems easily fixed. The mounting of /usr
before other services might cause problems on clients that mount /usr off the net.
In general, the advice from Unix System Administration Handbook and other books
is NOT to architect your network with 2 servers needing cross mounts from each
other. It is prone to cause problems beyond the boot-time race condition no
matter the OS.