Ian Kent wrote:
On Tue, 2008-07-15 at 13:48 -0700, Chris Walker wrote:
autofs 5.0.3
linux 2.6.18
When statfs() is called on an automounted directory, it returns before
the automount occurs. This results in output like this initially:
That may be because there are a group of system calls that don't trigger
a mount because we have to avoid mount storms for map entries that use
the browse option. In particular stat(2) and calls that use the same
kernel path lookup flags, such as statfs(2).
Basically, if the mount point directory exists in the autofs file system
but doesn't currently have a mount for some reason (perhaps it wasn't
removed at expire or the entry uses the browse option), these calls will
return the attributes of the autofs directory without performing a
mount.
Hi Ian,
I need to say that this basically has to be declared a bug. I have been
silent on this until now because I am so over committed with other
tasks, and haven't had time to test it so cleanly as Chris has.
At my lab we find that on machines that do large batch processing,
automounted directories often aren't there at the time that they are
stat-ed. The workaround has been to put in some nanosleeps to give the
mount point a chance to mount, but that is very much a hack, since now
the code authors need to know the point where an automount is joined, or
they at least have to find it out empirically. The code they write has
become unportable and for all we know, incompatible on other systems if
the autofs mount points are different.
To throw this in the mix, somehow, our Solaris systems, which share
identical automount maps, simply never have this issue. Is there an
architectural reason for this? And if so, can we learn how this is so,
and apply similar logic to the Linux autofs/mount path?
Thanks,
Jon
_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs