Lesson 6

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


Exercise: NFS automount
  • Install autofs on n01 (NFS client).
    apt-get install autofs
    

  • Make sure /NFS/home directory is unmounted:
    df -h
    
    If it shows in the list of mounted file systems, unmount it. Remove directory /NFS/home:
    rmdir /NFS/home
    

  • Configure the master map file, /etc/auto.master, and specify the timeout 60 seconds. The content of file /etc/auto.master should be the following:
    /NFS   /etc/auto.exports  --timeout=60
    

    Configure the exports map file, /etc/auto.exports:
    home  -rw,fstype=nfs4  master:/NFS/home
    

    Restart or reload autofs:
    service autofs restart
    

    Access the file system and check if it gets mounted:
    cd /NFS/home
    df -h
    

  • Step out of the directory:
    cd 
    
    Run command df -h again in about two minutes to see if it gets unmounted automatically after the inactivity period.




  • Take me to the Course Website