All of lore.kernel.org
 help / color / mirror / Atom feed
* Allow vers=4 and nfsvers=4 mount options
@ 2009-05-05 21:46 Kevin Constantine
       [not found] ` <1241560004-16787-1-git-send-email-kevin.constantine-FfNkGbSheRGpB8w63BLUukEOCMrvLtNR@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin Constantine @ 2009-05-05 21:46 UTC (permalink / raw)
  To: linux-nfs

I've run into a problem recently while trying to set up an environment for testing
nfsv4.  In our environment, we have a mixture of Linux, and OSX, and all of our mounts
are made via automount maps stored in LDAP which are shared among the platforms.  The
problem is made even more complicated by the fact that some of our file servers
support v4, while others do not.  This means that v4 mounts need to be specified on
a mount by mount basis, and only on certain test machines.

With nfsv4, Linux appears to use fstype=nfs4 to distinguish between v2,3 and v4, and
attempts to specify vers=4, or nfsvers=4 error.  OSX doesn't understand fstype
and mounts error when this option is encountered.  OSX instead relies on
vers=2,3,4 or nfsvers=2,3,4 to determine the version.  It appears that Solaris will
likely behave the same way as OSX based on the manpage, though I haven't tested it.

I've written the following patches to allow vers=4, and nfsvers=4 to be passed to
the mount command.  There's a patch for the text-based mount, and a second for the
older style mount options.  In both cases, I attempt to detect the vers= option
as early as possible in order to set fstype=nfs4, and then let the code continue on
as though the user had specified fstype=nfs4 on the command line.

Using these patches, I can now specify something like:
pamtest4  -rw,intr,hard,timeo=600$RSZ,vers=$NFSVERS     supportsv4:/vol/someexport
pamtest3  -rw,intr,hard,timeo=600$RSZ                   supportsv3only:/vol/v3export
in the automount map.  The variable $NFSVERS is set to 4 on the test clients, and 3
on production Linux machines, and OSX.

[PATCH 1/2] Allow nfs/vers=4 option in old style mount commands
[PATCH 2/2] Allow nfs/vers=4 option in text-based mount commands

-kevin

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-05-07 20:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-05 21:46 Allow vers=4 and nfsvers=4 mount options Kevin Constantine
     [not found] ` <1241560004-16787-1-git-send-email-kevin.constantine-FfNkGbSheRGpB8w63BLUukEOCMrvLtNR@public.gmane.org>
2009-05-05 21:46   ` [PATCH 1/2] Allow nfs/vers=4 option in old style mount commands Kevin Constantine
     [not found]     ` <1241560004-16787-2-git-send-email-kevin.constantine-FfNkGbSheRGpB8w63BLUukEOCMrvLtNR@public.gmane.org>
2009-05-05 21:46       ` [PATCH 2/2] Allow nfs/vers=4 option in text-based " Kevin Constantine
     [not found]         ` <1241560004-16787-3-git-send-email-kevin.constantine-FfNkGbSheRGpB8w63BLUukEOCMrvLtNR@public.gmane.org>
2009-05-05 22:02           ` Chuck Lever
2009-05-07 20:03             ` Kevin Constantine
     [not found]               ` <4A033E7C.9060605-P5ys19MLBK/QT0dZR+AlfA@public.gmane.org>
2009-05-07 20:47                 ` Chuck Lever
2009-05-05 22:08       ` [PATCH 1/2] Allow nfs/vers=4 option in old style " Chuck Lever

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.