On Mon, Mar 11, 2019 at 09:40:16AM -0400, Kurt Mosiejczuk wrote:
> As far as I can tell, no man page documents the fs_mntops form of the
> mount_nfs(8) options for fstab(5). Most of us who use them either know
> from some other documentation, reading the source, or just doing a
> copy-paste from somwhere.
>
> I went through the source and wrote them down, and here is a first stab
> at documenting them in mount_nfs(8).
>
> I chatted with Ingo many weeks ago about how to do the formatting, and
> he was invaluable help. This is much less ugly than my initial attempt.
>
> I can't really think of a better place to put this information than
> mount_nfs(8), but welcome suggestions. I also welcome feedback on how
> best to push this information into the man page.
>
> --Kurt
Looking at mount_nfs.c, I don't see all options you mention in the
mopts array. Where did you find them? e.g. udp does not exist in that
list.
When trying to test it:
ds:/tmp /mnt nfs rw,udp 0 0
I just get this:
mount_nfs: -o udp: option not supported
As I would expect. According to the table it's called "mntudp", and that
one is accepted.
So I'm confused as to where you did find the fstab option names you
mention.
-Otto
>
> Index: mount_nfs.8
> ===================================================================
> RCS file: /cvs/src/sbin/mount_nfs/mount_nfs.8,v
> retrieving revision 1.39
> diff -u -p -r1.39 mount_nfs.8
> --- mount_nfs.8 6 Jun 2009 20:58:50 -0000 1.39
> +++ mount_nfs.8 10 Mar 2019 19:28:01 -0000
> @@ -66,27 +66,48 @@ It implements the mount protocol as desc
> .%T "NFS: Network File System Version 3 Protocol Specification" ,
> Appendix I.
> .Pp
> -The options are as follows:
> +The options are as follows.
> +Many of them can be specified permanently in the
> +.Fa fs_mntopts
> +field of the
> +.Xr fstab 5
> +configuration file for use with the one-argument form of
> +.Xr mount 8 .
> .Bl -tag -width Ds
> .It Fl 2
> +.Cm ( v2
> +in
> +.Xr fstab 5 )
> Use the NFS Version 2 protocol.
> .It Fl 3
> +.Cm ( v3
> +in
> +.Xr fstab 5 )
> Use the NFS Version 3 protocol.
> The default is to try version 3 first, and
> fall back to version 2 if the mount fails.
> .It Fl a Ar maxreadahead
> +.Cm ( readahead=
> +in
> +.Xr fstab 5 )
> Set the read-ahead count to the specified value.
> This may be in the range of 0\-4, and determines how many blocks
> will be read ahead when a large file is being read sequentially.
> Trying a value greater than 1 for this is suggested for
> mounts with a large bandwidth-delay product.
> .It Fl b
> +.Cm ( bg
> +in
> +.Xr fstab 5 )
> If an initial attempt to contact the server fails, fork off a child to keep
> trying the mount in the background.
> Useful for
> .Xr fstab 5 ,
> where the file system mount is not critical to multiuser operation.
> .It Fl c
> +.Cm ( noconn
> +in
> +.Xr fstab 5 )
> For UDP mount points, do not do a
> .Xr connect 2 .
> This must be used for servers that do not reply to requests from the
> @@ -100,6 +121,9 @@ This may be useful for UDP mounts that e
> since it is possible that the dynamically estimated timeout interval is too
> short.
> .It Fl g Ar maxgroups
> +.Cm ( maxgrouplist=
> +in
> +.Xr fstab 5 )
> Set the maximum size of the group list for the credentials to the
> specified value.
> This should be used for mounts on old servers that cannot handle a
> @@ -107,15 +131,24 @@ group list size of 16, as specified in R
> Try 8, if users in a lot of groups cannot get a response from the mount
> point.
> .It Fl I Ar readdirsize
> +.Cm ( rdirsize=
> +in
> +.Xr fstab 5 )
> Set the readdir read size to the specified value.
> The value should normally be a multiple of
> .Dv DIRBLKSIZ
> that is less than or equal to the read size for the mount.
> .It Fl i
> +.Cm ( intr
> +in
> +.Xr fstab 5 )
> Make the mount interruptible, which implies that file system calls that
> are delayed due to an unresponsive server will fail with EINTR when a
> termination signal is posted for the process.
> .It Fl l
> +.Cm ( readahead=
> +in
> +.Xr fstab 5 )
> Used with NFSV3 to specify that the
> .Dq readdir plus
> RPC should
> @@ -171,6 +204,9 @@ The default is to query the portmapper f
> Set the retry count for doing the mount to the specified value.
> The default is 10000.
> .It Fl r Ar readsize
> +.Cm ( rsize=
> +in
> +.Xr fstab 5 )
> Set the read data size to the specified value.
> It should normally be a power of 2 greater than or equal to 1024.
> This should be used for UDP mounts when the
> @@ -186,15 +222,24 @@ See the
> .Fl w
> option as well.
> .It Fl s
> +.Cm ( soft
> +in
> +.Xr fstab 5 )
> A soft mount, which implies that file system calls will fail
> after
> .Ar retrans
> round trip timeout intervals have been reached (see
> .Fl x ) .
> .It Fl T
> +.Cm ( tcp
> +in
> +.Xr fstab 5 )
> Use TCP instead of UDP.
> Note that TCP may not be supported by some very old NFS servers.
> .It Fl t Ar timeout
> +.Cm ( timeo=
> +in
> +.Xr fstab 5 )
> Set the initial retransmit timeout to the specified value in milliseconds.
> May be useful for fine tuning UDP mounts over internetworks
> with high packet loss rates or an overloaded server.
> @@ -208,11 +253,17 @@ option should be specified when using th
> tune the timeout
> interval.)
> .It Fl U
> +.Cm ( udp
> +in
> +.Xr fstab 5 )
> Force the mount protocol to use UDP, even for TCP NFS mounts.
> (Necessary for some old
> .Bx
> servers.)
> .It Fl w Ar writesize
> +.Cm ( wsize=
> +in
> +.Xr fstab 5 )
> Set the write data size to the specified value.
> Ditto the comments w.r.t. the
> .Fl r
> @@ -226,6 +277,9 @@ and
> options should only be used as a last ditch effort at improving performance
> when mounting servers that do not support TCP mounts.
> .It Fl x Ar retrans
> +.Cm ( retrans=
> +in
> +.Xr fstab 5 )
> Set the retransmit timeout count for soft mounts to the specified value.
> Defaults to 10.
> .El
>