On Sat, 2007-07-28 at 15:15 +0800, Ian Kent wrote:
> On Fri, 2007-07-27 at 17:45 +0200, Lukas Kolbe wrote:
> > Hi Ian,
> > >
> > > I'll have to think about for a while and have a look at the code.
> >
> > Thank you :)
> >
> > > What does your auto_homes look like?
> >
> > ypmatch is my friend:
> >
> > [EMAIL PROTECTED] ypmatch lkolbe auto_homes
> > figaro:/users/rbghiwis01/rbghiwis/&
> > [EMAIL PROTECTED] ypmatch fstest auto_homes
> > thor:/export/rbg/homes/staff/&
> > [EMAIL PROTECTED] ypmatch vkgnome auto_homes
> > figaro:/users/stud09/stud/&
> >
> > Where figaro is a Solaris 8 or 9 server serving nfs3, thor is a solaris
> > 10 box serving nfs4 from zfs-volumes.
>
> Presumably the exports are distinct, in which case using a list of
> server should allow autofs to try each one?
>
> What about trying something like:
On second thoughts this may get only the nfs4 or only the nfs3 servers
as well.
>
> In the master map put:
> /homes auto_homes nosuid,grpid,nobrowse,proto=tcp,port=2049
>
> In NIS auto_homes put:
> * thor:/export/rbg/homes/staff/& figaro:/users/rbghiwis01/rbghiwis/&
> figaro:/users/stud09/stud/&
>
> With the order determined by the server likely to get the most hits.
>
> Ensure that /etc/nsswitch has:
> automount: files nis
>
> and /etc/auto_homes, either doesn't exist or contains, as the last line,
> +auto_homes
>
> And finally this patch.
> Beware, I haven't even compile tested this and I know I excluded the
> NFS4 here for a reason, which I can't remember atm.
>
> Ian
>
> ---
> diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c
> index 25f72b9..7083200 100644
> --- a/modules/mount_nfs.c
> +++ b/modules/mount_nfs.c
> @@ -130,8 +130,10 @@ int mount_mount(struct autofs_point *ap, const char
> *root, const char *name, int
>
> if (strcmp(fstype, "nfs4") == 0)
> vers = NFS4_VERS_MASK | NFS_PROTO_MASK;
> - else
> + else if (strcmp(fstype, "nfs") == 0)
> vers = NFS_VERS_MASK | NFS_PROTO_MASK;
> + else
> + vers = NFS4_VERS_MASK | NFS_VERS_MASK | NFS_PROTO_MASK;
>
> if (!parse_location(&hosts, what)) {
> warn(ap->logopt, MODPREFIX "no hosts available");
>
>
> _______________________________________________
> autofs mailing list
> [email protected]
> http://linux.kernel.org/mailman/listinfo/autofs
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs