On Fri, 16 Jul 1999, Jeremy Fitzhardinge wrote:

> On 16-Jul-99 Roy Hulen Stogner wrote:
> > 
> > Why does autofs remove subdirectories after they expire and are
> > unmounted?  For example, I have autofs handling the /nfs directory on
> > a laptop, mounting a number of subdirectories /nfs/u3, /nfs/d4, etc.
> > on demand.  However, the directories only exist while they are being
> > used:
> 
> That would make the mere act of an ls -l /net cause them all to be remounted. 
> That is certainly not universally desireable, but I guess some people might
> want it as an option.

Would it have to remount the directories?  It would have to do so to
get accurate owner/permissions, I suppose, but for most cases just
pulling the directory names out of the config file, and giving them
fake permissions like root.root 0660 would be preferable to not having
them visible at all.

Alternatively, autofs could cache (i.e. just leave unchanged)
owner/permissions info from the last mount.  That wouldn't be
guaranteed accurate, and would have to be updated when the directory
was actually accessed more deeply than stat().  It wouldn't break
any programs if the permissions were obsolete, since it would just
look like another process had slipped a chmod() in after the stat() but
before the "real" access.  And of course, 99% of the time the server
won't have changed the permissions on the directory it's exporting,
the old permissions will be correct, and the directory will look just
like normal fstab-mounted NFS directories.

> It also conflicts with doing tree-mounts to some extent[1].  It
> doesn't affect normal autofs, but if you have a tree of directories
> making up, do you let them all persist, or just the top-level ones?

Hmmm... this I haven't dealt with.  Sorry for bringing up the question
as such a newbie - I just configured autofs (and got it working nicely
aside from that one gripe - cool program) for the first time at work
this morning.  I haven't played with submounts or executable maps yet,
and I haven't heard of tree mounts...


By the way, I did look at your page of autofs patches, and I'm
definitely interested in the idea of executable maps returning many
mount points.  With something like that, it seems to me, you could put
together a solid Network Neighborhood with smbfs and a quick perl
script around smbclient to scan local and user-configured subnets...
I know a lot of people who would be overjoyed to see Linux do that.

The problem is that the list of shares you want mountable changes
while you're booted up (as other computers are turned on/off, as
shares are created/destroyed, etc.) and AFAIK automount only runs
program maps once.
---
Roy Stogner
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Reply via email to