How to Autofs

View previous topic View next topic Go down

How to Autofs

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

###AutoFS###

Features:

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





Requirements:

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
DEFAULT_TIMEOUT=300




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





Task:

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 192.168.75.199:/nfs1
avatar
Admin
Admin

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

View user profile http://linux.nsguru.com

Back to top Go down

View previous topic View next topic Back to top


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