Total Pageviews

Wednesday, 3 June 2009

How to autofs NFS automount

Automount will mount a filesystem on demand, just by issuing an ls or a cd to a directory

An example to mount myserver:/oracle/test on /export/oracle in the local machine :

1) Create the mount point, and define the file to use by autofs

a) vi / etc / auto.master

/ export /etc/ auto.export

****We are defining the mount point, and the file that contains the mount information

2) We must now create the /etc/ auto.export file

a) vi / etc / auto.export

oracle soft, int, rw myserver: /oracle/ test

3) We must change the value of BROWSE_MODE in / etc / sysconfig / autofs to let mount the filesystem with a cd or ls.

a) vi / etc / sysconfig / autofs

# BROWSE_MODE - maps are browsable by default.

4) Start autofs

a) /etc/init.d/ autofs start
b) chkconfig autofs on

No you can mount myserver:/oracle/test on /export/oracle by jus cd in to the directory.

No comments: