Lesson 6

Date: 2/19/2014
Network File System (NFS)
Linux for Engineering and IT Applications


Export/mount directory over NFS

  • NFS server exports a directory and NFS client mounts it.
  • NFS server may run several versions of NFS, for example, NFSv2, NFSv3, and NFSv4.
  • NFS client chooses the NFS version at the mount time.



    Create the export filesytem on the NFS server (master):
    mkdir /NFS
    
    Export the file system to the client, n01:
    exportfs -o rw  n01:/NFS
    

    On the NFS client, create the mounting point, /NFS, and mount the file system, exported from the NFS server:
    mkdir /NFS
    mount -t nfs -o vers=4 master:/NFS /NFS 
    
    Alternatively, the file system, /NFS, can be mounted on the client with the different NFS version, for example, 3:
    mount -t nfs -o vers=3 master:/NFS /NFS
    

    The NFS server and the client can be also referred by their IP addresses. For example,
    exportfs -o rw  192.168.5.36:/NFS
    

    mount -t nfs -o vers=4 192.168.5.16:/NFS /NFS
    



  • Take me to the Course Website