Re: autofs timeouts no longer working?
Hi, again!
As sometimes happens, soon after I posted my help request, I found the
answer! It turns out that 'gkrellmd' was using the statfs() call
periodically on all of the mounted filesystems: this activity meant the
kernel would never expire those mounts (like my cd) under autofs.
lsof did not catch this, since the statfs() is so brief.
To find the cause, I went into single-user mode (telinit 1) and killed any
daemon I did not recognise. I then started the autofs daemons
(/etc/init.d/autofs start) and tested to see if the automount was
expiring... it was! So one of the other daemons on my runlevel were
causing the problem. I went through the first few daemons in /etc/rc5.d/
until I found that the problem came back with gkrellmd.
Solution 1: disable gkrellmd ... quick fix.
Solution 2: I patched gkrellmd to ignore non-NFS sub-mounts of autofs mounts.
Works well, small patch, but I'll have to clean it a bit before
submitting it to the bug-tracker.
Hope this helps someone else with similar problems!
On Fri, 20 Jan 2006, Stephen Benoit wrote:
> Hello, everyone.
>
> I have been using autofs since Debian Potato. Among other things, I use
> it to automount my cd/dvd drive and release/unmount it after 15
> idle seconds. When I switched from Debian Woody to Sarge, the automount
> processes never expired the unused mount again.
>
> I have tried 3 different hosts on Sarge with the same effect whether I use
> linux 2.6.15 with udev or 2.4.31 with devfs. I also tried using the older
> autofs3 protocol, but since it made no difference, I am using autofs4.
>
> Packages used:
> autofs 4.1.3+4.1.4beta2
> mount: 2.12p-4sarge1
>
> Using lsof, the directory tree looks ununsed by any processes. Using
> strace, the automount process sets the timeout by an ioctl(), but later
> polling of the kernel by ioctl() always returns -EAGAIN, meaning nothing
> is ready to be unmounted.
>
> I reduced my test setup to the simplest I could, even removing any
> symlinks in the device or mountpoint:
>
> ---vvv---/tmp/myautofile---vvv---
> cdrw -fstype=auto,ro :/dev/scsi/host0/bus0/target0/lun0/cd
> ---^^^---/tmp/myautofile---^^^---
>
> # mkdir /tmp/remov
> # automount --debug --pid-file=/var/run/autofs/_tmp_remov.pid --timeout=15 /tmp/remov file /tmp/myautofile
>
> # ls /tmp/remov/cdrw/
> ... after mounting, shows directory of cdrw.
> ... time passes, nothing is using the cd.
> ... /tmp/remov/cdrw never unmounts.
>
> I welcome suggestions. Has there been a configuration change for
> autofs between Woody and Sarge that I missed?
>
> Stephen Benoit
> debian@magnumline.com
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>
>
Reply to: