NFS configuration example (/etc/exports)

Just a quick example for nfs export path.

Format
<Local Path> <hosts>(<Options>) [<more hosts>(<Options>)...]

For read-only path
/xyz/abc 192.168.1.111(ro,root_squash)

For read-write path
/abc/xyz 192.168.1.112(rw,no_root_squash)

Hosts

  • Single Host FQDN, IP address of single machine i.e. 192.168.1.1
  • Wildcards i.e. *.semicolon.in.th
  • IP Networks i.e. 192.168.1/24

Options Separate by ,

  • root_squash Client's root user will be mapped to nobody in nfs server
  • no_root_squash Client's root user will be root in nfs server
  • all_squash Client's ALL users will be mapped to nobody in nfs server
  • anonuid,anongid Specify user/group in nfs server instead of nobody
  • ro Read-only
  • rw Read and write are legal
  • sync Let client wait for nfs server to complete the write
  • async Opposite to sync ;P

References:
http://www.novell.com/coolsolutions/feature/15986.html
http://nfs.sourceforge.net/nfs-howto/ar01s03.html#config_server_setup