Linux NFS Configuration

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Export Options

The following export options are used in /etc/exports:

/volume1/wiki        192.168.1.2(rw,async,no_wdelay,no_root_squash,insecure_locks,sec=sys,anonuid=0,anongid=0)
/volume3/dropbox 192.168.1.0/24(rw,async,no_wdelay,no_root_squash,insecure_locks,sec=sys,anonuid=0,anongid=0)

rw

This option allows both read and write.

sync

The requests to the exported directory are confirmed only after the changes are committed.

no_subtree_check

This option prevents the subtree checking. When a shared directory is the subdirectory of a larger filesystem, nfs performs scans of every directory above it, in order to verify its permissions and details. Disabling the subtree check may increase the reliability of NFS, but reduce security.

no_root_squash

This phrase allows root to connect to the designated directory.

Mount Options

dirsync

All directory updates within the filesystem should be done synchronously. This affects the following system calls: creat, link, unlink, symlink, mkdir, rmdir, mknod and rename.

nolock

rpc.statd - Handling NFS Locking in Absence of rpc.statd

_netdev, bg

_netdev prevents the mount before the network is up. bg is background so it will proceed with boot if nfs server not available, it will keep trying in background until available.