Skip to main content.

14.3.10. Mounting a Filesystem over NFS hangs forever

Question:
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 192.168.1.1:/target/home /home

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

Answer:
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 192.168.1.1:/target/home /home

Explanation:
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.
14.3.9. System hangs when entering User Space (ARM) 1. Abstract 14.3.11. Ethernet does not work in Linux
Prev Home Next