2003-01-08 23:24:27

by devnull

[permalink] [raw]
Subject: nfs client using autofs v4

Dear Managers,

Apologies for the cross post.

We have some linux clients running on RH 7.3 with 2.4.18, and i am trying
to mount filesystems using NIS from a mixture of

Network Appliance boxes running v2 and v3 NFS(UDP and TCP)
Dell Box running Redhat 7.3 and 2.4.20 v2 and v3(UDP ONLY)

I am running autofsv4-pre10 from http://www.kernel.org(mainly to get /net).

We would like to default all NFS mounts to use TCP and if not available
use UDP. This way all mounts coming from Network Appliance will be TCP and
the ones from the Linux Box will be UDP.

Does anyone know of a way of doing this.

Adding localoptions='nfsvers=3,tcp,udp' to the local autofs startup script
does not work.

Maybe this is a compile-time option to autofs(i dont see one)

Worst case, i will need to make separate "auto_master" files for the Suns
and the Linux machines(i would like to avoid this)

Many thanks,

Best Regards.

/dev/null

[email protected]



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs


2003-01-09 01:17:13

by Ion Badulescu

[permalink] [raw]
Subject: Re: nfs client using autofs v4

On Wed, 8 Jan 2003 18:24:27 -0500 (EST), [email protected] wrote:
>
> We would like to default all NFS mounts to use TCP and if not available
> use UDP. This way all mounts coming from Network Appliance will be TCP and
> the ones from the Linux Box will be UDP.
>
> Does anyone know of a way of doing this.
>
> Adding localoptions='nfsvers=3,tcp,udp' to the local autofs startup script
> does not work.
>
> Maybe this is a compile-time option to autofs(i dont see one)

No, because autofs doesn't know anything about NFS. It simply calls the
external mount program with the arguments you gave it.

What you need is a mount program which can autodetect what the server
supports in terms of NFS service. I don't know of any such mount, though.
Your alternative is amd (http://www.am-utils.org), whose 6.1 version (now in late
beta) supports autofs mounts and which can do this autodetection and more.

Hope this helps,
Ion
[am-utils co-maintainer and primary developer of autofs support in amd]

--
It is better to keep your mouth shut and be thought a fool,
than to open it and remove all doubt.


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2003-01-09 20:48:05

by Scott Mcdermott

[permalink] [raw]
Subject: Re: nfs client using autofs v4

Ion Badulescu on Wed 8/01 20:17 -0500:
> > We would like to default all NFS mounts to use TCP and if not
> > available use UDP. This way all mounts coming from Network Appliance
> > will be TCP and the ones from the Linux Box will be UDP.
>
> No, because autofs doesn't know anything about NFS. It simply calls the
> external mount program with the arguments you gave it.
>
> What you need is a mount program which can autodetect what the server
> supports in terms of NFS service.

is there a way at runtime to detect if the client (running mount(8))
supports a TCP mount? This would have to be tested first before trying
to reach a server.


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2003-01-09 21:11:02

by Ion Badulescu

[permalink] [raw]
Subject: Re: nfs client using autofs v4

On Thu, 9 Jan 2003, Scott Mcdermott wrote:

> is there a way at runtime to detect if the client (running mount(8))
> supports a TCP mount? This would have to be tested first before trying
> to reach a server.

Only heuristically, based on the kernel version, and even that doesn't
take into consideration the possibility that v3 support was not compiled
into the kernel.

So amd tries a v3 mount (if the server supports it), and if that fails
with EINVAL then it retries the mount as v2/UDP. It's not ideal, but it
works.

Ion

--
It is better to keep your mouth shut and be thought a fool,
than to open it and remove all doubt.



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs