<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener("load", function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <iframe src="http://www.blogger.com/navbar.g?targetBlogID=7336462756272110356&amp;blogName=Adminlinux.org++++(......)&amp;publishMode=PUBLISH_MODE_HOSTED&amp;navbarType=BLUE&amp;layoutType=CLASSIC&amp;searchRoot=http://www.adminlinux.org/search&amp;blogLocale=en_GB&amp;homepageUrl=http://www.adminlinux.org/&amp;vt=6729395747110618495" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" height="30px" width="100%" id="navbar-iframe" allowtransparency="true" title="Blogger Navigation and Search"></iframe> <div></div>

Dreaming Linux, Use free software Save the World....

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.
#
BROWSE_MODE = "yes"

4) Start autofs

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

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

Need Help? Join Our Chat Room

1 Comments:

Anonymous Anonymous said...

Editing the etc/sysconfig/autofs file made my autofs work. I referenced 3 Redhat books and none mentioned about the config file. Thank you very much for the steps for autofs! From Seattle, WA USA

4 December 2009 14:20

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home