On Fri, 2007-08-10 at 15:25 +0200, Lukas Kolbe wrote:
> Hi!
> 
> 
> > >> > /homes  multi yp auto_homes 
> > >> > -fstype=nfs4,nosuid,grpid,nobrowse,proto=tcp,port=2049 -- \
> > >> >                yp auto_homes 
> > >> > -fstype=nfs,nosuid,grpid,nobrowse,proto=tcp,port=2049
> > >> > 
> > >> > and see if that gets what you need. The nfs4 one needs to be first
> > >> > because the v4 servers provide both v4 and v3.
> > >> 
> > >> This only gives me the nfs4 mounts, it seems like the second part of the
> > >> multimount is not evaluated when the first one says "I don't have that
> > >> directory you asked me about":
> > >
> > > Aaah yes, of course, sorry about that.
> > > That would be because the first encountered key is used to decide pass
> > > or fail.
> > 
> > No, it is because the second key was never added to the cache.  See my
> > earlier, somewhat cryptic message on this.
> > 
> > As Pete said, if the default should be nfs4, that should happen in mount.
> 
> Yes and no :)
> 
> I'm currently trying to understand the autofs5 code and stumbled upon
> modules/replicated.c, function prune_host_list that get's called from
> mount_nfs.c and *somehow* decides wether to try nfs4 or other nfs
> versions. Would any of you be so kind and explain the way that the
> information from the entry in the auto.master-map (-fstype=nfs4 or =nfs)
> gets propagated down to the actual mount command? 

You probably just want to look at modules/mount_nfs.c.

The actual chain of events is:
1) Parse master map and mount automounts, create
daemon/automount.c:handle_mounts thread for each mount.
2) daemon/automount.c:handle_mounts dispatches events as they come in.
3) A missing packet for an indirect mount leads to a call to
daemon/indirect.c:handle_packet_missing_indirect.
4) Then -> daemon/indirect.c:do_mount_indirect ->
daemon/lookup.c:lookup.c -> modules/lookup_<type>.c:lookup_mount ->
modules/parse_sun.c:parse_mount -> modules/mount_<type>.c:mount_mount.

Ian


_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to