NFS v2? possible?
tillman at seekingfire.com
Sun Nov 9 19:09:05 PST 2003
On Sun, Nov 09, 2003 at 07:48:53PM -0700, Chad Leigh -- Shire.Net LLC wrote:
> On Nov 9, 2003, at 4:28 AM, Kris Kennaway wrote:
> > On Sun, Nov 09, 2003 at 01:33:23AM -0700, Chad Leigh -- Shire.Net LLC
> > wrote:
> >> Hi
> >> I have a linux server that needs to mount my FBSD server's web volume
> >> and the linux server only has v2 support right now (and I cannot make
> >> my own kernel since this is a UML kernel distributed as part of a
> >> product) and so I would like to run a v2 compatible nfs server on my
> >> FBSD server if possible. Can I do this? How? Thanks
> > Read the mount_nfs and/or nfsd manpages..the answer is right there.
> The mount_nfs is for mounting on FreeBSD. I am serving from FreeBSD
> and mounting on Linux, so that does not apply. I read the nfsd man
> page a few time before posting, and just did again, and I see nothing
> in their about nfs versions except that the server listens on the port
> as outlined in thge NFS v3 spec. Please enlighten me on what I should
> read in the nfsd man page.
The client needs to request the mount version. Check the Linux man page
for `mount`, under the "Mount options for nfs" section. man nfs(5) is
It looks like the default for Linux NFS clients (at least on a fairly
recent RedHat box) is to use version 2.
As root, I just did the following on the RedHat client (served by my
4-STABLE NFS server, Athena):
# mount -t nfs -o nfsvers=2 athena:/exports/pub test
I then tested the results by running mount (results trimmed to only
relevant examples ... warning, the lines are long and may wrap):
athena:/exports/pub on /nfs/pub type nfs (rw,noexec,nosuid,nodev,mountvers=3,hard,intr,nolock,udp,wsize=8192,rsize=8192,addr=192.168.23.3)
athena:/exports/pub on /home/tillman/tmp/test type nfs (rw,nfsvers=2,addr=192.168.23.3)
The first line is my regular mount of the 'pub' export from Athena. It's
NFS version 3 because that's what I have in my /etc/fstab. The second
line is my 'test' mount of the same export ... it's NFSv2 because that
what I explicitly requested at the command line when running mount
manually (as shown above).
It's the same nfsd on the server side. I didn't do anything specify to
enable NFS version 2, my rc.conf entry says nfs_server_flags="-u -t -n
14" (the 14 is because it's a high-usage NFS server and my testing shows
that I consistently peak at around 12-14 nfsd's in use). You just have
to have the client request that version.
One day, a student asked a master, "Master, there is conflict between the
suits and the sysadmins. Which group has the Zen nature, and which group is
grieviously disturbing the stillness of the Tao?" And the master said nothing,
but installed an operating system. And the student was enlightened.
- A.S.R. quote (Anthony DeBoer)
More information about the freebsd-questions