All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Leonardo Chiquitto <leonardo.lists@gmail.com>
Cc: toto <guillaume@apostoly.com>, autofs@vger.kernel.org
Subject: Re: stat -L triggering mount (behavior change starting with 2.6.38-rc1)
Date: Wed, 27 Mar 2013 12:06:02 +0800	[thread overview]
Message-ID: <1364357162.2011.32.camel@perseus.fritz.box> (raw)
In-Reply-To: <CAEySpB7frBeNDFAZM8+magDZqSNwf4XEQqzUK652hrak9H5tXA@mail.gmail.com>

On Tue, 2013-03-26 at 17:41 -0300, Leonardo Chiquitto wrote:
> On Tue, Mar 26, 2013 at 9:56 AM, toto <guillaume@apostoly.com> wrote:
> > Leonardo Chiquitto <leonardo.lists <at> gmail.com> writes:
> >
> >>
> >> Hello,
> >>
> >> After the update to 2.6.38, I noticed that AutoFS started to mount volumes
> >> at times it normally wouldn't. More specifically, "ls -la" inside an AutoFS
> >> mount point will trigger the mount of all available maps.
> > __________
> >> autofs mailing list
> >> autofs <at> linux.kernel.org
> >> http://linux.kernel.org/mailman/listinfo/autofs
> >>
> >
> > Hi,
> 
> Hi,
> 
> > When you are saying that "ls -la" should not trigger
> >  the automounting of the volumes inside the directory,
> > what would be then the good command line to
> > trigger the mounting of volumes declared in auto.master ?
> 
> The problem that was discussed in this thread was about
> accesses to a parent directory triggering mounts of volumes
> in sub-directories. An example:
> 
> /nfs/volume1
> /nfs/volume2
> 
> Here volume1 and volume2 are two automounted directories.
> What was happening is that "ls -la /nfs" was triggering the
> mounts of volume1 and volume2.

That's right, hence the problem could only occur with indirect mount
maps that used the "browse" option. When the browse option isn't used
the mount point directories don't get pre-created so the mount occurs
with access by create type usage (create being a vfs lookup, not
necessarily a create type system call).

> 
> > I am using Mac OS X 10.8.3 and by default,
> > the elements defined in automaster are mounted when
> > accessed by an application (like the Finder,
> >  which is if you don't know the file manager of OS X), but how
> > then to trigger the silent mounting at startup
> > with a shell script ?
> 
> You just need to access the volume. Using the example above,
> any of these should work:
> 
> $ stat /nfs/volume1/    #  the slash at the end is important
> $ cd /nfs/volume1
> $ ls /nfs/volume1

Yes, the trailing "/" causes the vfs to treat the lookup as a directory
lookup which will cause the automounter to be sent a mount request for
the directory. It should only be needed when the browse option is used
with an indirect mount map.

There were some transitional kernel revisions from 2.6.38, resulting
from the vfs-automount infrastructure introduction (a large change),
where the behavior would cause excessive mounting, AFAICR it was mostly
due to inconsistent system call usage by user space utilities.

> 
> > Are there parameters to pass to "mount"
> > command to say "mount this folder
> > NOW as defined in auto master" ?

Not sure what that means, it sounds like it amounts to the same as
adding entries to the fstab ....

Mount(8) doesn't (and shouldn't) know anything about the automount
master map or automount itself since it isn't involved in the automount
function (other than to be called upon to perform a mount) and it would
add unacceptable dependencies, possibly circular, to mount itself.

Umm ... you may be able to get different behavior by using a direct
mount map instead of an indirect mount map. But if you have very large
maps that could introduce, possibly too much, additional overhead.

Ian



  parent reply	other threads:[~2013-03-27  4:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-28 22:53 stat -L triggering mount (behavior change starting with 2.6.38-rc1) Leonardo Chiquitto
2011-04-01  4:27 ` Ian Kent
2011-04-01  4:55   ` Ian Kent
2011-04-01  9:19   ` David Howells
2011-04-01 12:20     ` Leonardo Chiquitto
2011-04-01 14:27       ` David Howells
2011-08-03 14:16         ` Leonardo Chiquitto
2011-04-01  4:38 ` Ian Kent
2011-04-01 12:13   ` Leonardo Chiquitto
2013-03-26 12:56 ` toto
2013-03-26 20:41   ` Leonardo Chiquitto
2013-03-27  0:13     ` Guillaume Apostoly
2013-03-27  4:06     ` Ian Kent [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-03-30 16:19 Leonardo Chiquitto

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=1364357162.2011.32.camel@perseus.fritz.box \
    --to=raven@themaw.net \
    --cc=autofs@vger.kernel.org \
    --cc=guillaume@apostoly.com \
    --cc=leonardo.lists@gmail.com \
    /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.