Re: autofs prevent timeout with activity?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 11, 2012 at 9:46 AM, Brian J. Murrell <brian@xxxxxxxxxxxxxxx> wrote:
> Using autofs 5.0.6 I am wondering how timeouts works.  Should continued
> use of an automounted filesystem prevent automount from timing out the
> mount and unmounting it?
>
> I ask because I see a strange flapping of one (and only one) of my
> automounted filesystems.  For example, the NFS server serving it
> reports the following unmount/mount activity for the last few hours.
>
> Oct 11 06:55:51 linux rpc.mountd[23986]: authenticated mount request from 10.75.22.1:746 for /home/share (/home)
> Oct 11 07:02:05 linux rpc.mountd[23986]: authenticated unmount request from 10.75.22.1:686 for /home/share (/home)
> Oct 11 07:02:07 linux rpc.mountd[23986]: authenticated mount request from 10.75.22.1:908 for /home/share (/home)
> Oct 11 07:08:20 linux rpc.mountd[23986]: authenticated unmount request from 10.75.22.1:808 for /home/share (/home)
> Oct 11 07:08:23 linux rpc.mountd[23986]: authenticated mount request from 10.75.22.1:888 for /home/share (/home)
> Oct 11 07:14:35 linux rpc.mountd[23986]: authenticated unmount request from 10.75.22.1:944 for /home/share (/home)
> Oct 11 07:14:39 linux rpc.mountd[23986]: authenticated mount request from 10.75.22.1:861 for /home/share (/home)
> Oct 11 07:20:50 linux rpc.mountd[23986]: authenticated unmount request from 10.75.22.1:616 for /home/share (/home)
> Oct 11 07:20:51 linux rpc.mountd[23986]: authenticated mount request from 10.75.22.1:787 for /home/share (/home)
> Oct 11 07:27:05 linux rpc.mountd[23986]: authenticated unmount request from 10.75.22.1:702 for /home/share (/home)
> Oct 11 07:27:07 linux rpc.mountd[23986]: authenticated mount request from 10.75.22.1:958 for /home/share (/home)
> Oct 11 07:33:20 linux rpc.mountd[23986]: authenticated unmount request from 10.75.22.1:788 for /home/share (/home)
> Oct 11 07:33:23 linux rpc.mountd[23986]: authenticated mount request from 10.75.22.1:827 for /home/share (/home)
> Oct 11 07:39:35 linux rpc.mountd[23986]: authenticated unmount request from 10.75.22.1:902 for /home/share (/home)
> Oct 11 07:39:39 linux rpc.mountd[23986]: authenticated mount request from 10.75.22.1:904 for /home/share (/home)
> Oct 11 07:45:50 linux rpc.mountd[23986]: authenticated unmount request from 10.75.22.1:977 for /home/share (/home)
> Oct 11 07:45:51 linux rpc.mountd[23986]: authenticated mount request from 10.75.22.1:905 for /home/share (/home)
> Oct 11 07:52:05 linux rpc.mountd[23986]: authenticated unmount request from 10.75.22.1:871 for /home/share (/home)
> Oct 11 07:52:07 linux rpc.mountd[23986]: authenticated mount request from 10.75.22.1:868 for /home/share (/home)
> Oct 11 07:58:20 linux rpc.mountd[23986]: authenticated unmount request from 10.75.22.1:971 for /home/share (/home)
> Oct 11 07:58:23 linux rpc.mountd[23986]: authenticated mount request from 10.75.22.1:837 for /home/share (/home)
> Oct 11 08:04:35 linux rpc.mountd[23986]: authenticated unmount request from 10.75.22.1:616 for /home/share (/home)
> Oct 11 08:04:39 linux rpc.mountd[23986]: authenticated mount request from 10.75.22.1:908 for /home/share (/home)
> Oct 11 08:10:50 linux rpc.mountd[23986]: authenticated unmount request from 10.75.22.1:727 for /home/share (/home)
> Oct 11 08:10:51 linux rpc.mountd[23986]: authenticated mount request from 10.75.22.1:1000 for /home/share (/home)
>
> This is just a small sample but this goes on 24x7.
>
> I have a number of other automounted filesystems that seem to stay
> mounted forever without any of this flapping so somehow automount is
> able to maintain those mounts stably.
>
> My auto.master looks like:
>
> /net    -hosts
> /autohome       /etc/auto.home
> /-              /etc/auto.global        --timeout=300
>
> The auto.home entry for the above mount is:
>
> share           -rw,intr,rsize=8192,wsize=8192          linux:/home/share
>
> The process that seems to be responsible for the continued activity on
> that mount (i.e. the one that is attributed to causing automount to
> mount it after it's been umounted is "Thunar" which is a GUI desktop
> file manager type of tool.  But given that the mount request happens
> within seconds of the unmount I'd expect that while mounted Thunar is
> causing activity every few seconds which I would hope would cause
> automount to keep the filesystem mounted.
>
> Any ideas?

Hi,

Coincidentally I've been looking at the same "problem" in the last days.
The expiration behavior depends on the kernel version. Kernels older
than 2.6.39 update the "last used" value only when the file system is
busy during the regular "expiration check" that happens every timeout/4
seconds. 2.6.39 and newer update the "last used" value every time a
file in the mount point is accessed (even a stat() counts as accessed
here).

For reference, this is the commit that changed the behavior:

commit 3c3199852905ceb90a70e98777e71d369a5f0823
Author: Ian Kent <raven@xxxxxxxxxx>
Date:   Fri Mar 25 01:51:08 2011 +0800

    autofs4 - reinstate last used update on access

    When direct (and offset) mounts were introduced the the last used
    timeout could no longer be updated in ->d_revalidate(). This is
    because covered direct mounts would be followed over without calling
    the autofs file system. As a result the definition of the busyness
    check for all entries was changed to be "actually busy" being an open
    file or working directory within the automount. But now we have a call
    back in the follow so the last used update on any access can be
    re-instated. This requires DCACHE_MANAGE_TRANSIT to always be set.


Which kernel version are you running?

Thanks,
Leonardo
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux