How to Change NFS block size for NFS based RFS


Many of our boards experience NFS timeouts when mounting the RFS over NFS, but this can often be solved by simply changing the NFS block size.


NFS mounted RFS which is experiencing nfs timeouts similar to the one shown below.

nfs: server not responding, still trying


Add the 'nfsroot' option to your kernel command line as per the documentaion below and change the block size to something reasonable like 1024 (1024 is no longer the default, even if it says it is).


  If the `nfsroot' parameter is NOT given on the command line, the default
  "/tftpboot/%s" will be used.

  <server-ip>    Specifies the IP address of the NFS server. If this field
        is not given, the default address as determined by the
        `ip' variable (see below) is used. One use of this
        parameter is for example to allow using different servers
        for RARP and NFS. Usually you can leave this blank.

  <root-dir>    Name of the directory on the server to mount as root. If
        there is a "%s" token in the string, the token will be
        replaced by the ASCII-representation of the client's IP

  <nfs-options>    Standard NFS options. All options are separated by commas.
        If the options field is not given, the following defaults
        will be used:
            port        = as given by server portmap daemon
            rsize        = 1024
            wsize        = 1024
            timeo        = 7
            retrans        = 3
            acregmin    = 3
            acregmax    = 60
            acdirmin    = 30
            acdirmax    = 60
            flags        = hard, nointr, noposix, cto, ac


On the i.MX31PDK the kernel command line changes from

noinitrd console=ttymxc0,115200 root=/dev/nfs rw ip=dhcp

noinitrd console=ttymxc0,115200 root=/dev/nfs rw ip=dhcp nfsroot=,rzise=1024,wsize=1024

Additional Resources

NFS Root