LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-05-2012, 01:45 PM   #1
coopz81
LQ Newbie
 
Registered: Oct 2012
Posts: 2

Rep: Reputation: Disabled
Redhat autofs mounting problems


Hi, Thanks for taking the time to read this.

Im trying to dynamicaly mount a directory on anotehr server but cant figure out for the life of me how to do this. Ive read just about the pages google can throw at me on this but alas im coming up blank.

For examples sake i have two server (server2 and server3).
on server 2 it has a folder /images and im wanting to mount this to server3 to the folder /net/server2/export/home/images/

What ive done so far is to edit the /etc/auto.master on server2 so it reads
Code:
/images /etc/auto.misc
and in /etc/auto.misc ive put
Code:
* -fstype=nfs4,soft,intr,rsize=32768,wsize=32768,nosuid server2IP:/images
and then
Code:
/sbin/service autofs restart
/sbin/service autofs status
/sbin/service autofs reload
Then im stuck as to what I need to do on server3 or if ive got the contents right of the master / misc files.

I have successfuly mounted the said drive using normal nfs mount command so I know that it works, its just by lack of autofs knowledge thats halting my progression.

If anyone could point me out where im going wrong that would be great

Thanks again
 
Old 10-05-2012, 01:55 PM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
can you manually mount the nfs share?

if so, please type the exact command (less IP, user/pw real data)

try this link too:

http://www.centos.org/docs/4/4.5/Sys...ng_autofs.html

Last edited by lleb; 10-05-2012 at 01:57 PM.
 
Old 10-05-2012, 01:56 PM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,577
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
/net is a special setup that gives quick access without normal mounting to any filesystem that the host (NFS client) has access to due to the export from the original server (NFS server). You do NOT configure mount directories under /net.

In your case server2 is the NFS server and server3 is the NFS client.
On server2 you have to export /images in /etc/exports just as you would for a normal NFS (non-autofs) mount. That is to say autofs deals only with the client side and the server side setup is the same whether doing traditional or autofs.

Once you've exported from server2 with appropriate permissions for server3 then on server3 you would access the filesystem by going to /net/server2/images.

If you instead want a different path to images you CAN configure that via automounter but you should make your target mount somewhere else on server3 that is NOT in /net (e.g. /mnt/server2/export/home/images/).
 
1 members found this post helpful.
Old 10-08-2012, 04:53 AM   #4
coopz81
LQ Newbie
 
Registered: Oct 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by lleb View Post
can you manually mount the nfs share?

if so, please type the exact command (less IP, user/pw real data)

try this link too:

http://www.centos.org/docs/4/4.5/Sys...ng_autofs.html
mount -t nfs server2:/images /home/images

and that works fine, I just dont know what i should be putting in /etc/auto.misc and /etc/auto.master
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help : want to different mounting on the same folder (fstab, autofs) herofmm Linux - Networking 1 02-14-2009 02:25 AM
autofs mounting problem vm_devadas Linux - Networking 2 12-21-2007 06:25 AM
autofs not mounting (FC4) phyrko Linux - Software 2 01-17-2006 03:22 PM
how to use autofs for mounting windows partition abhis_mail2002 Fedora 6 12-19-2005 01:41 AM
Automatic mounting without autofs installed hampel Linux - Distributions 0 07-04-2003 12:00 PM


All times are GMT -5. The time now is 10:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration