Lesson 6

Date: 6/14/2017
Network File System (NFS)
Linux System Administration


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