How to Autofs

Go down

How to Autofs

Post  Admin on Thu Nov 26, 2009 3:19 am



1. Automatically mounts file systems (NFS, local, SMBFS, etc.) upon I/O request


1. autofs-*rpm must be installed
# rpm -qa | grep autofs
# yum install autofs*
# rpm -ql autofs

/etc/auto.master - primary configuration file

- also contains mount points and their mappings

/etc/auto.misc - contains the primary mount point /misc and the about to mount file system

/etc/sysconfig/autofs - default startup directives

Note: AutoFS must be running in order to auto-mount directories


1. Create an automount for /shares, which will mount /nfs1 & /nfs2

a. update /etc/auto.master - '/shares /etc/auto.shares'

b. cp /etc/auto.misc /etc/auto.shares

c. update the rules in /etc/auto.shares

d. Create AutoFS tree: /shares/

e. Restart the autofs service

Note: Do NOT auto-mount directories that are already mounted

g. Test access to AutoFS controlled directory

g1. 'ls -l /shares/nfs1'

Note: syntax for auto-mount files is as follows:

<mount-point> [<options>] <location>

nfs1 -fstype=nfs

Posts : 32
Join date : 2009-09-13
Age : 32
Location : Chennai

View user profile

Back to top Go down

Back to top

Permissions in this forum:
You cannot reply to topics in this forum