check_disk and autofs
Andreas Ericsson
ae at op5.se
Thu Nov 13 09:41:41 CET 2008
Alan McKay wrote:
>> I guess that my expectation is that automounter would wait
>> about 10 minutes before unmounting.
>
> I'm not sure why this should matter though. It's job is to mount when
> needed, and unmount when not needed.
>
The problem is that it isn't needed when check_disk does its check,
as it just parses the table of currently mounted partitions. If the
disk isn't mounted and you run "df -h", do you see the partition in
the list? If not, that's the same problem, and I'm guessing you've
got some other process accessing stuff on that automounted partition
with infrequent intervals (so that check_disk happens to flip states
between each check). If you do see it, then check_disk is probably
doing something the regular old df isn't, and should be fixed.
>> I guess that my expectation is that automounter would wait about 10
>> minutes before unmounting. Typical normal_check_interval is 5. Lots of
>> assumptions on my part there about your configuration.
>
> I have not changed many defaults, certainly not that one.
>
> Here's a question : by what means does check_disk do it's checking?
> I guess it's using system calls? Which ones?
strace be thy friend (or whatever tracer is available for the platform
you're using).
> I can look into those
> calls to see if there is a cleaner way around this than writing a
> wrapper script.
>
You can use a wrapper-script to just cd to the automounted path and
then run check_disk. That should make it work, since the cd'ing into
the path trigger the auto-mounter if necessary, or prevent it from
un-mounting in the split second check_disk does its thing.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list