Frithjof Anders <[EMAIL PROTECTED]> writes:
> Thus spoke Simon Liddington on 19-Feb-99 :
> > Hi,
> >
> > I am using the autofs-3.1.1-4.i386.rpm package on redhat 5.2.
> >
> > If I restart the automounter with these commands it stops but doesn't
> > restart again.
> >
> > /etc/rc.d/init.d/autofs stop
> > /etc/rc.d/init.d/autofs start
> >
> > If I try to start it by hand and type
> >
> > /usr/sbin/automount --timeout 60 /net file /etc/auto.net
> >
> > then it returns immediately and does nothing.
> >
> > It seems to only start if started at boot up.
>
> type
> /etc/rc.d/init.d/autofs status
>
> it gives you, which point moints a configured and with are active e.g
> something like:
>
> Configured Mount Points:
> ------------------------
> automount /home yp auto.home
> automount /imports yp auto.imports
>
> Active Mount Points:
> --------------------
> automount /home yp auto.home
> automount /imports yp auto.imports
>
>
> If you stop the automounter with the script and the mount points are still in
> use, the automounter process will be killed and if you do give a started
> afterwards it will not be started again on the mount points which are still in
> use :) You have to kill all
> processes, which use the automounter mount point, kill eventuall all still
> running automount processes. Then you can start new.
>
> This is a weekness of the autofs implementation. I am not an expert, just a
> user of autofs, but I guess it has to do with the fact, that part of the autofs
> runs in the kernel. The amd automounter was nicer with that respect: you
> could kill and restart it and it worked fine.
>
Thanks, this makes sense. Here's some more info:
I found this in the logs (Dunno why I didn't look there in the first
place)
The stop command doesn't unmount from /net because some of the mounts
were still busy and so the restart failed.
Here's the logs:
Feb 18 11:58:42 rayleigh automount[333]: shutting down, path = /net
Feb 18 11:58:42 rayleigh automount[333]: could not unmount /net/hartley
Feb 18 11:58:42 rayleigh automount[333]: could not unmount /net/comms6
Feb 18 11:58:42 rayleigh automount[333]: could not unmount /net/viper
Feb 18 11:58:42 rayleigh automount[333]: >> umount: /net: device is busy
Feb 18 11:58:44 rayleigh automount[4787]: starting automounter version 3.1.1, path =
/net, maptype = file, mapname = /etc/auto.net
Feb 18 11:58:44 rayleigh automount[4787]: >> mount: automount(pid4787) already mounted
or /net busy
Feb 18 11:58:44 rayleigh automount[4787]: >> mount: according to mtab,
automount(pid333) is already mounted on /net
Feb 18 11:58:44 rayleigh automount[4787]: /net: mount failed!
Unfortunately there are other user processes using the mounts so I
can't really just kill them all off to restart automount. It would be
nice if automount could keep some table like mtab of mounts that were
setup by it and then when it is restarted it takes control of them
again.
I imagine the official line on this is that you don't need to restart
an automount process because you can just change the map file and it
should take effect immediately. The "autofs reload|restart" only kills
or starts mounts which have changed in the auto.master file.
I guess I'll either have to kill those processes or permanently mount
the directories until the next reboot!
Simon
--
-----------------------------------------------------------------------
| Simon Liddington | |
| E-Mail : [EMAIL PROTECTED] | Tel (work) : +44 (0)1703 592422 |
-----------------------------------------------------------------------