NFS Network File System Howto

General Steps

  1. Install nfs packages
  2. Alter /etc/exports
  3. Restart nfs server
  4. Mount on client

Server Commands

  • Install nfs packages for Ubuntu/debian
    • sudo apt-get install nfs-kernel-server nfs-common portmap
      
    • Following install statements may be important:
      • Creating config file /etc/idmapd.conf with new version
        Creating config file /etc/default/nfs-common with new version
        Adding system user `statd' (UID 112) ...
        Adding new user `statd' (UID 112) with group `nogroup' ...
        ...
        Creating config file /etc/exports with new version
        Creating config file /etc/default/nfs-kernel-server with new version
        
  • Add something like the following to /etc/exports . See here for more details
    • rw - read write access
    • async - double checks file writes, faster, riskier (can corrupt easier)
    • no_subtree_check - do not invoke subtree algorithm which verifies that a file that is requested from the client is in the appropriate part of the volume.
    • # raid5 lms (linux media server) share
      /media/documents   192.168.1.0/255.255.255.0(rw,async,no_subtree_check)
      
  • Restart the nfs server
    • sudo /etc/init.d/nfs-kernel-server restart
  • Update nfs file share lists
    • sudo exportfs -a
  • Version and other info of running nfs’s
    • nfsstat

Mac OS X

Finder

  • Ctrl+K
  • nfs://server.name/path/of/share

Command Prompt

  • mount -o -P lms:/media/documents /Volumes/lms

Directory Utility

A built-in utility to OS X after Leopard that can keep track of mounts via a nice GUI.

Bonjour

Linux

Command Prompt

  • mount master.foo.com:/home /mnt/home

/etc/fstab file

  • # device       mountpoint     fs-type     options      dump fsckorder
    ...
    master.foo.com:/home  /mnt    nfs          rw            0    0
    ...
    

Cavaets

  • Syntax errors in /etc/exports
  • options not correct in exports file
  • uid / gid not matching on client and server
  • little windows support

See this doc: http://www.troubleshooters.com/linux/nfs.htm

 
technology/unix/nfs.txt · Last modified: 09.25.2008 06:53 by 71.166.39.38
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki