Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

auto.misc, automount not working

Status
Not open for further replies.

sonun

IS-IT--Management
Dec 26, 2001
384
0
0
US
I have this Samba/YP network where the samba has been set up on raid arrays. I installed this new
system (refurbished) with redhat7.1, following exactly the same steps I used when I was installing other systems.
On this particular system, the auto.misc reads like this,
# $Id: auto.misc,v 1.2 1997/10/06 21:52:04 hpa Exp $
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage

kernel -ro,soft,intr ftp.kernel.org:/pub/linux
cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
csl -rw,bg,intr chaos:/home/csl
csl1 -rw,bg,intr chaos:/home/csl1
csl2 -rw,bg,intr chaos:/home/csl2
But, I am unable to see it, on the client directory where I have this auto.misc, when I go to /home directory, I see three blinking folders csl, csl1, csl2. Well, they are blinking because they are actually symlinks to csl,csl1,csl2 in /misc and /misc is empty.
So, how do I go about this. Also, on the server where samba is installed, when ever I try to turn automount on, it just doesnt. I have manually mount all folders each time I reboot. I dont know what the problem is. On all the client machines, they are automounted, except this one which is not. But I cant do so similarly on the server.
Help please.
Thanks.
 
Hi,

Stating the obvious really, but have you actually got the autofs service started ?

/etc/rc.d/init.d/autofs restart

Also, did you create the mount points ? Fot example if your /etc/auto.master had

/mnt /etc/auto.misc --timeout 60

then you would need to create the mount points as :

/mnt/csl
/mnt/csl1
/mnt/csl2

etc. (i.e. where /mnt/ as the high level mount directory is determined by the first parameter of auto.master)

In theory if you did 'ls /mnt/cs1' then the mount should happen in the background and you'd see the contents of the nfs share.

Are you saying that the other entries work - e.g. for /mnt/kernel (or is it /home/kernel ?) ?

Hope this helps
 
I am a bit confused here. Need some clarfications.
Firstly, I did try starting autofs, but that didnt help.

Secodnly, my /etc/auto.master does say,
/mnt /etc/auto.misc --timeout 60

Thirdly, when you say you have create mount points as,
/mnt/csl
/mnt/csl1
/mnt/csl2
I am not sure how to this. Sorry for being so dumb.

Lastly, I am not sure I understand this corectly,
"Are you saying that the other entries work - e.g. for /mnt/kernel (or is it /home/kernel ?) ?"
I can mount floppies and stuff, but I dont see a /mnt/kernel anywhere or even in /home.

Also, I have a bundle of other probs/questions,
I can ssh to the NFS server to see the files.
In solaris I get they have a automountd, I guess to start the automount daemon. Whats similar in Linux. I am not very sure about automount in Redhat, yet.

Thanks a bunch.
 
Hi,



Actually got myself a bit confused there - you don't have to create (sub) mount points for autofs mounts its all transparent. Also, its maybe best to use the redhat default mount point of /misc to avoid confusion if you use /mnt to mount other stuff. So, lets say you keep the default of /etc/auto.master :



/misc /etc/auto.misc --timeout=60



do a 'mkdir /misc'



and start the daemon manually ...



/etc/rc.d/init.d/autofs start



Now, if you reference /misc/csl (e.g. by doing 'ls /misc/csl' or 'ls /misc/kernel') the automounter should have mounted that filesystem as shown behind the scenes and the content will just magically be there. The points I was trying to emphasise were :



(i) you need the autofs service running



(ii) the mount point is determined by a 'concatenation' of the first parameter of /etc/auto.master and the first field of the /etc/auto.misc . So if auto.master has 'misc' then 'kernel' would be /misc/kernel, etc.



(Actually I have to say I can't get the example kernel one to work at all on my system but everything is fine, nfs mounts or local partitionsm, etc.)



On redhat to automatically run autofs you configure it to be triggered by the sysv init scripts at appropriate run-levels. To see what runlevels it runs at do as root :



/sbin/chkconfig --list autofs



to set run-levels do



/sbin/chkconfig --level 345 autofs on



Hope this helps









 
Oops, I am sorry. Actually the auto.master does say,/
misc /etc/auto.misc --timeout=60
and I have already posted my auto.misc file.
I was blind not to see that. Sorry.

Also,
/sbin/chkconfig --list autofs: gives,
autofs 0:eek:ff 1:eek:ff 2:eek:ff 3:eek:n 4:eek:n 5:eek:n 6:eek:ff
So thats ok.

But, the problem still remains !!!. It is still not loading the NFS shares.
I can ssh to the server and see the contents though.
 
Hi,

OK... if you put a line like this in /etc/auto.misc :

src -rw,soft,intr localhost:/usr/src

and reload autofs :

/etc/rc.d/init.d/autofs reload

then do

ls /misc/src

does it work ??

Also if you manually mount the nfs shares does it work :

mount chaos:/home/csl -t nfs /mnt/wherever

(presumably those shares are setup in /etc/exports or equivalent on the other box with suitable permissions ?)

Regards

 
Ok, the first thing works, but the second thing throws up an error like,
mount: chaos:/home/csl failed, reason given by server: Permission denied.
Now what permissions ???
I created a directory called temp with + 775 in /mnt and,
mount chaos:/home/csl -t nfs /mnt/temp
But it gives a problem as I told before. Anything wrong with that ???
Thanks.
 
Hi,

OK.. looks like automount is working but you have a problem mounting nfs shares. If you can't mount manually neither can automount.

You haven't said much about this 'chaos' box. Are you sure that it has a nfs daemon active and that it has 'exported' the nfs shares you are trying to access ?

The way of doing it varies between different unix / linux implementations but, if 'chaos' were another linux box then you would normally define the shares 'statically' in /etc/exports then invoke 'exportfs -av' to export or unexport everything listed in /etc/ exports . Or you can just restart the nfsd service which should do likewise :

/etc/rc.d/init.d/portmap restart
/etc/rc.d/init.d/nfs restart

You can see whats currently exported by a remote machine by doing :

showmount -e chaos

If the exported shares exist then it is just a matter of permissions. You may need to check the /etc/exports file or equivalent .

Regards
 
Chaos does have an active nfs daemon as other machines are able to access it. /etc/exports on chaos looks like this,
/home/csl1 @csl-hosts(rw)
/home/csl2 @csl-hosts(rw)
/home/csl @csl-hosts(rw)
/home/outsiders @csl-hosts(rw)
/home/bbf @csl-hosts(rw)

Also, showmount doesnt seem to be recognized even by root, on local as well as remote machine,
bash: showmount: command not found.

Regs.

 
Hi,

showmount is in the nfs-utils rpm and is at :

/usr/sbin/showmount

Remember, if you just do 'su' to root from a regular account then that user's environment remains, e.g. the PATH. /usr/sbin would not be in the path so you either need to use the full path as above or do 'su -' instead of 'su' in which case you'll get root's PATH and it should just work as 'showmount'. For aviodance of doubt just do :

/usr/sbin/showmount -e chaos

Also do it on chaos itself as just

/usr/sbin/showmount -e

Because you are using nis groups (@csl-hosts) you need to check the NIS side too. Try experimenting with host name or IP address to see if its a NIS problem - e.g.

/home/csl *.yourdomain.com(ro,no_root_squash)

/home/csl 172.16.16.0/255.255.255.0(ro,no_root_squash)


Hope this helps

 
Thanks for the showmount info.
Regarding NIS, I will go through ever so thoroughly again. But let me tell you that this is happening only ona few systems. We got this consignet of 8 refurbished Dells of which I have had no probs on 5 machines. THe installation procedures for all of them were a carbon-copy of the other.
But I dunno why these 3 machines (two 7.1's (with an enhanced 2.4.6 kernel) and one 7.2).
Also, any idea why these machines have become real slow ??
They take like ages for anything to happen, which I think must be abnormal.
Also, one thing I know I amnot doing right is that I have only one console which I kepp switching between these machines. I dont have kvm 4 port switch yet (I have ordered for it already). So, now what I do is plug in and out keyboard, mouse and monitors and when I keep doing that, sometimes one of them freezes and I forced to power-down and restart. I guess it may be becuase of this I have these problems, as one of problem machine (7.1) was working fine some time before.
Thanks and sorry for the boring story !!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top