RedHat AutoFs Direct Mapping
id : cg6hdaz3as
category : computer
blog : unixlinux
created : 04/27/11 - 11:46:31

  • Autofs direct maps provide a mechanism to automatically mount file systems at arbitrary points in the file system hierarchy, this is called direct mapping.
  • Check if AutoFS is started at bootup
# chkconfig --list autofs
# chkconfig --level `runlevel | awk {'print $NF'}` autofs on

  • Edit /etc/auto.master, a direct map is denoted by a mount point of "/-" in the master map.
# tail -2 /etc/auto.master
# Direct Map Autofs
/- /etc/ --timeout 30

  • Edit /etc/, entries in a direct map contain an absolute path name as a key (instead of the relative path names used in indirect maps).
# cat /etc/
/tools/list/sasdepot -fstype=nfs,ro  nfs_server:/tools/list/sasdepot

  • Start or restart autofs
# service autofs restart

  • Test your configuration
# ls -l /tools/list
admin  cdc  CDC  product  sam  sas92  sasdepot  saswork  sinagios  tina  tivoli  Tivoli  wrstemp
# ls /tools/list/sasdepot
_dll_tasks  _edcam  _patchs  _plugin_graph_for_activex  sas92  sascfg  _security  third_party  _truststore  version_history
# mount | grep nfs
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfs_server:/tools/list/sasdepot on /tools/list/sasdepot type nfs (ro,addr=