Showing posts with label AUTOFS IN REDHAT LINUX. Show all posts
Showing posts with label AUTOFS IN REDHAT LINUX. Show all posts

Thursday, December 31, 2009

AUTOFS IN REDHAT LINUX

AUTOFS

Features:

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

1. autofs-*rpm must be installed

/etc/auto.master - primary configuration file
•- also contains mount points and their mappings

/etc/sysconfig/autofs - default startup directives

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

Task:

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

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

•cp /etc/auto.misc /etc/auto.shares

•update the rules in /etc/auto.shares

•Create AutoFS tree: /shares/

•Restart the autofs service

•Unmount: /nfs1 & /nfs2 if necessary

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

•Test access to AutoFS controlled directory

•'ls -l /shares/nfs1'

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

[]

•nfs1 -fstype=nfs 192.168.75.199:/nfs1