Automount

  • Automounter provides an on-demand method of mounting NFS file system and automatically unmounts them after a designated time period of inactivity (default 5 min).
  • For automount to work, autofs package has to be installed. The autofs uses so called "indirect" maps.

  • Automount maps configuration:
    The master map /etc/auto.master: access directory indirect map file timeout in sec.
    /mnt/home         /etc/auto.nfs-home      --timeout 60 
    /mnt/software     /etc/auto.nfs-soft      --timeout 300
    /mnt/docs         /etc/auto.nfs-docs        
    
    A client request to access a directory tree whose root is listed in the master map (such as cd /mnt/software) will cause the automounter to search the specified map for a server to satisfy the request.
  • The indirect map files,
    /etc/auto.nfs-docs:
    doc1  -ro,soft,intr  server1:/export/docs/doc1
    doc2  -ro,soft,intr  server2:/export/docs/doc2
    
    /etc/auto.nfs-soft
    matlab   server1:/export/matlab  server2:/export/matlab
    
    /etc/auto.nfs-home:
    *   -rw,hard,intr  server1:/export/home/&
    

  • To start automount daemon, run
    /etc/init.d/autofs start
    
  • After you modify the maps, run
  • /etc/init.d/autofs reload
    
  • To invoke autofs at the startup, run
    update-rc.d autofs defaults 
    
  • To verify that the autofs is running,
  • /etc/init.d/autofs status
    

    Previous Pageprevious First Pagetop Next Pagenext