to mount a NFS share on boot you need to specify it in /etc/fstab (/etc/init.d/rc.local -> script did not work for me in debian-jessie)

apt-get install nfs-common; # install basic software needed to mount nfs

sudo vim /etc/fstab
# add this line at the end of fstab
192.168.XXX.XXX:/DATA /mnt/DATA nfs rw,rsize=32768,wsize=32768,hard,intr,async,nodev,nosuid 0 0
# reboot system and test if it works
reboot

Client Options

These options can be specified using the

mount

command, or in the

/etc/fstab

entry:

  • rw: Read/write filesystem.
  • ro: Read-only filesystem. Remote NFS clients can’t modify the filesystem.
  • hard: Applications using files stored on an NFS will always wait if the server goes down. User cannot terminate the process unless the option
    intr

    is set.

  • soft: Applications using files stored on an NFS will wait a specified time (using the
    timeo

    option) if the server goes down, and after that, will throw an error.

  • intr: Allows user interruption of processes waiting on a NFS request.
  • timeo=<num>: For use with the soft option. Specify the timeout for an NFS request.
  • nolock: Disable file locks. Useful with older NFS servers.
  • noexec: Disable execution of binaries or scripts on an NFS share.
  • nosuid: Prevents users from gaining ownership of files on the NFS share.
  • rsize=<num>: Sets the read block data size. Defaults to 8192 on NFSv2 and NFSv3, and 32768 on NFSv4.
  • wsize=<num>: Sets the write block data size. Defaults to 8192 on NFSv2 and NFSv3, and 32768 on NFSv4.
admin