DENX . DULG . MountingAFilesystemOverNFSHangsForever

14.3.10. Mounting a Filesystem over NFS hangs forever

We use the SELF ramdisk image that comes with the ELDK. When we try to mount a filesystem over NFS from the server, for example:

# mount -t nfs /home

the command waits nearly 5 minutes in uninterruptable sleep. Then the mount finally succeeds. What's wrong?

The default configuration of the SELF was not designed to mount additional filesystems with file locking over NFS, so no portmap deamon is running, which is causing your problems. There are two solutions for the problem:
  1. Add the portmap deamon (/sbin/portmap) to the target filesystem and start it as part of the init scripts.
  2. Tell the "mount" program and the kernel that you don't need file locking by passing the "nolock" option to the mount call, i. e. use

    # mount -o nolock -t nfs /home

If you call the mount command like above (i. e. without the "nolock" option) an RPC call to the "portmap" deamon will be attempted which is required to start a lockd kernel thread which is necessary if you want to use file locking on the NFS filesystem. This call will fail only after a very long timeout.

----- Revision r1.2 - 16 Aug 2004 - 19:20 - RobDay
Copyright © 2002-2021 by DENX Software Engineering