From: Jeff Moyer <jmoyer@redhat.com>
To: "\"Peter Lojkin\" " <ia6432@inbox.ru>
Cc: autofs@linux.kernel.org
Subject: Re: Re[4]: autofs reload
Date: Fri, 26 Mar 2004 12:38:37 -0500 [thread overview]
Message-ID: <16484.27293.279258.40887@segfault.boston.redhat.com> (raw)
In-Reply-To: <E1B6v3m-0000cJ-00.ia6432-inbox-ru@f25.mail.ru>
==> Regarding Re[4]: [autofs] autofs reload; "Peter Lojkin" <ia6432@inbox.ru> adds:
ia6432> On Fri, 26 Mar 2004 at 12:07:58 -0500, Jeff Moyer wrote: yes this
ia6432> share was umounted a couple of days prior to auto.home nis map
ia6432> update.
>> What I meant was, at the time you did an ls, were you sure that there
>> were no applications accessing the directory.
ia6432> yes there're no applications accessing the directory...
>> If nothing was accessing the directory (even if it is mounted), then
>> autofs should be able reload just fine. If that's not the case, then I
>> am certainly perplexed.
ia6432> looks like it now needs HUP signal to update cache as mentioned in
ia6432> other rely...
Duh. Reload only checks for changes in the auto.master file. Sorry for
the noise.
>> >> controlled by autofs. Attached is a patch which addresses this. >>
>> Comments welcome.
ia6432> this should fix autofs reload or stop/start? i'll try...
>> No, this will prevent the automount daemon from starting more than once
>> for a given mount point. Sorry if that was confusing.
ia6432> well it works i.e. no more duplicate automount and it's good. but
ia6432> now we need to fix "stop" because when i did autofs stop, then
ia6432> installed new version and did autofs start i got unusable /auto and
ia6432> /home. with autofs stop all automount processes stoped but autofs
ia6432> on /auto and /home was not umounted (there're directories in use),
ia6432> so when i started new version no daemon came up for this points.
ia6432> then i did umount /auto /home and got several "Busy inodes after
ia6432> unmount". after next autofs restart everything worked...
Did the script return success when you issued the stop? My guess is it
just didn't wait long enough for the umount? Just a guess.
Anyway, I've got some changes to the redhat side of the autofs script to
change the status it prints out (to reflect reality). Perhaps the attached
patch is worth including?
It may even be beneficial to change autofs reload to send a HUP to all
automount daemons. Ian, what do you think?
Cheers,
Jeff
--- autofs-4.1.1/samples/rc.autofs.in.init-redhat-only 2004-01-29 11:01:22.000000000 -0500
+++ autofs-4.1.1/samples/rc.autofs.in 2004-03-19 17:41:35.000000000 -0500
@@ -344,7 +336,11 @@
getmounts | tee $TMP | sh
RETVAL=$?
if [ -s $TMP ] ; then
- success "$prog startup" || failure "$prog startup"
+ if [ $RETVAL -eq 0 ] ; then
+ success "$prog startup"
+ else
+ failure "$prog startup"
+ fi
[ $RETVAL = 0 ] && touch /var/lock/subsys/autofs
else
echo -n "" $"No Mountpoints Defined"
@@ -356,22 +352,25 @@
stop)
echo -n $"Stopping $prog:"
if [ -z "`pidofproc $prog`" -a -z "`getmounts`" ]; then
- success $"$prog shutdown"
RETVAL=0
else
signal_automounts
RETVAL=$?
- success "$prog shutdown" || failure "$prog shutdown"
fi
count=0
while [ -n "`/sbin/pidof $DAEMON`" -a $count -lt 10 ] ; do
- killproc $DAEMON -USR2 2> /dev/null
+ killproc $DAEMON -USR2 >& /dev/null
RETVAL=$?
[ $RETVAL = 0 -a -z "`/sbin/pidof $DAEMON`" ] || sleep 3
count=`expr $count + 1`
done
umount -a -f -t autofs
rm -f /var/lock/subsys/autofs
+ if [ -n "`/sbin/pidof $DAEMON`" ] ; then
+ failure "$prog shutdown"
+ else
+ success "$prog shutdown"
+ fi
echo
;;
restart)
next prev parent reply other threads:[~2004-03-26 17:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-26 15:41 autofs reload "Peter Lojkin"
2004-03-26 16:11 ` Jeff Moyer
2004-03-26 16:35 ` Re[2]: " "Peter Lojkin"
2004-03-26 17:07 ` Jeff Moyer
2004-03-26 17:23 ` Re[4]: " "Peter Lojkin"
2004-03-26 17:38 ` Jeff Moyer [this message]
2004-03-27 1:37 ` Ian Kent
2004-03-29 10:56 ` Ian Kent
2004-03-26 16:58 ` Mike Waychison
2004-03-26 17:27 ` Re[2]: " "Peter Lojkin"
2004-03-26 17:34 ` Mike Waychison
2004-03-27 0:53 ` mmarion
2004-03-29 14:59 ` Ryan Go
2004-03-29 15:17 ` Tom Georgoulias
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16484.27293.279258.40887@segfault.boston.redhat.com \
--to=jmoyer@redhat.com \
--cc=autofs@linux.kernel.org \
--cc=ia6432@inbox.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.