Lesson 6

Date: 6/11/2018
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

    mount -t nfs -o vers=4 /NFS

  • Take me to the Course Website