Next Previous Contents

8. FAQs

This is the FAQ section. It is partly based on a old NFS FAQ by Alan Cox.

If you have a problem mounting a filesystem please see if your problem is described in the ``Mount Checklist'' section.

  1. I get a lot of ``stale nfs handle'' errors when using Linux as a nfs server.

    This is caused by a bug in some old nfsd versions. It is fixed in nfs-server2.2beta16 and later.

  2. When I try to mount a file system I get
      can't register with portmap: system error on send
      
    

    You are probably using a Caldera system. There is a bug in the rc scripts. Please contact Caldera to obtain a fix.

  3. Why can't I execute a file after copying it to the NFS server?

    The reason is that nfsd caches open file handles for performance reasons (remember, it runs in user space). While nfsd has a file open (as is the case after writing to it), the kernel won't allow you to execute it. Nfsds newer than  spring 95 release open files after a few seconds, older ones would cling to them for days.

  4. My NFS files are all read only

    The Linux NFS server defaults to read only. Please read the section about ``Mountd and nfsd'' and ``Exporting filesystems'' in this HOWTO, and refer to the ``exports'' and ``nfsd'' manual pages. You will need to alter /etc/exports.

  5. I mount from a Linux NFS server and while ls works I can't read or write files.

    On older versions of Linux you must mount a NFS servers with rsize=1024,wsize=1024.

  6. I mount from a Linux NFS server with a block size of between 3500-4000 and it crashes the Linux box regularly

    Basically don't do it then. This does not happen with 2.0 and 2.2 kernels. As far as I recall there is no problem with 1.2 either.

  7. Can Linux do NFS over TCP

    No, not at present.

  8. I get loads of strange errors trying to mount a machine from a Linux box.

    Make sure your users are in 8 groups or less. Older servers require this.

  9. When I reboot my machine it sometimes hangs when trying to unmount a hung NFS server.

    Do not unmount NFS servers when rebooting or halting, just ignore them, it will not hurt anything if you don't unmount them. The command is umount -avt nonfs.

  10. Linux NFS clients are very slow when writing to Sun and BSD systems

    NFS writes are normally synchronous (you can disable this if you don't mind risking losing data). Worse still BSD derived kernels tend to be unable to work in small blocks. Thus when you write 4K of data from a Linux box in the 1K packets it uses BSD does this

            read 4K page
            alter 1K
            write 4K back to physical disk
            read 4K page
            alter 1K
            write 4K page back to physical disk
            etc..
      
    

  11. When I connect many clients to a Linux NFS server the performance suddenly drops.

    The NFS protocol uses fragmented UDP packets. The kernel has a limit of how many fragments of incomplete packets it can have before it starts throwing away packets. In 2.2 this is runtime tuneable via the /proc filesystem: /proc/sys/net/ipv4/ipfrag_high_thresh and ipfrag_low_thresh. In 2.0 these are compile-time constants defined in .../linux/net/ipv4/ip_fragment.c, IPFRAG_HIGH_THRESH and IPFRAG_LOW_THRESH. The meaning of these values is that once the memory consumption of unassembled UDP fragments reaches the ``ipfrag_high_thresh'' in bytes (256K by default in 2.2.3 and 2.0.36) it is cut down to ``ipfrag_low_tresh'' at once. This is done by throwing away fragments. This will look almost like packet loss, and if the high threshold is reached your server performance drops a lot.

    256K is enough for up to 30 clients. If you have 60, double it. And double the low threshold also.

  12. I'm using Linux 2.2 (or later) with knfsd and I can't get my AIX, IRIX, Solaris, DEC-Unix, ... machine to mount it.

    Knfsd announces that it implements NFS version 3. It does not. There is an option to stop it from announcing it. Use it. Or you can put "vers=2" in the mount option list on the clients.

  13. My AIX 4 machine cannot mount my Linux NFS server. It says
            mount: 1831-011 access denied for server:/dir
            mount: 1831-008 giving up on:
            server:/dir
            The file access permissions do not allow the specified action.
      
    
    or something like that instead.

    AIX 4.2 used reserved ports (<1024) for NFS. AIX 4.2.1 and 4.3 are not constrained to reserved ports. Also, AIX 4.2.1 and 4.3 try to mount using NFS3, then NFS/TCP, then fiannly NFS/UDP.

    Adding


    nfso -o nfs_use_reserved_ports=1
    

    to the end of rc.tcpip will force it to use reserved ports again. (This tip was supplied by Brian Gorka)


Next Previous Contents