summaryrefslogtreecommitdiffstats
path: root/utils/mount/nfsmount.conf
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--utils/mount/nfsmount.conf144
-rw-r--r--utils/mount/nfsmount.conf.man131
2 files changed, 275 insertions, 0 deletions
diff --git a/utils/mount/nfsmount.conf b/utils/mount/nfsmount.conf
new file mode 100644
index 0000000..c498eb8
--- /dev/null
+++ b/utils/mount/nfsmount.conf
@@ -0,0 +1,144 @@
+#
+# /etc/nfsmount.conf - see nfsmount.conf(5) for details
+#
+# This is an NFS mount configuration file. This file can be broken
+# up into three different sections: Mount, Server and Global
+#
+# [ MountPoint "Mount_point" ]
+# This section defines all the mount options that
+# should be used on a particular mount point. The '<Mount_Point>'
+# string need to be an exact match of the path in the mount
+# command. Example:
+# [ MountPoint "/export/home" ]
+# background=True
+# Would cause all mount to /export/home would be done in
+# the background
+#
+# [ Server "Server_Name" ]
+# This section defines all the mount options that
+# should be used on mounts to a particular NFS server.
+# Example:
+# [ Server "nfsserver.foo.com" ]
+# rsize=32k
+# wsize=32k
+# All reads and writes to the 'nfsserver.foo.com' server
+# will be done with 32k (32768 bytes) block sizes.
+#
+[ NFSMount_Global_Options ]
+# This statically named section defines global mount
+# options that can be applied on all NFS mount.
+#
+# Protocol Version [3,4]
+# This defines the default protocol version which will
+# be used to start the negotiation with the server.
+# Defaultvers=4
+#
+# Setting this option makes it mandatory the server supports the
+# given version. The mount will fail if the given version is
+# not support by the server.
+# Nfsvers=4
+#
+# Network Protocol [udp,tcp,rdma] (Note: values are case sensitive)
+# This defines the default network protocol which will
+# be used to start the negotiation with the server.
+# Defaultproto=tcp
+#
+# Setting this option makes it mandatory the server supports the
+# given network protocol. The mount will fail if the given network
+# protocol is not supported by the server.
+# Proto=tcp
+#
+# The number of times a request will be retired before
+# generating a timeout
+# Retrans=2
+#
+# The number of minutes that will retry mount
+# Retry=2
+#
+# The minimum time (in seconds) file attributes are cached
+# acregmin=30
+#
+# The Maximum time (in seconds) file attributes are cached
+# acregmax=60
+#
+# The minimum time (in seconds) directory attributes are cached
+# acdirmin=30
+#
+# The Maximum time (in seconds) directory attributes are cached
+# acdirmax=60
+#
+# Enable Access Control Lists
+# Acl=False
+#
+# Enable Attribute Caching
+# Ac=True
+#
+# Do mounts in background (i.e. asynchronously)
+# Background=False
+#
+# Close-To-Open cache coherence
+# Cto=True
+#
+# Do mounts in foreground (i.e. synchronously)
+# Foreground=True
+#
+# How to handle times out from servers (Hard is STRONGLY suggested)
+# Hard=True
+# Soft=False
+#
+# Enable File Locking
+# Lock=True
+#
+# Enable READDIRPLUS on NFS version 3 mounts
+# Rdirplus=True
+#
+# Maximum Read Size (in Bytes)
+# Rsize=8k
+#
+# Maximum Write Size (in Bytes)
+# Wsize=8k
+#
+# Maximum Server Block Size (in Bytes)
+# Bsize=8k
+#
+# Ignore unknown mount options
+# Sloppy=False
+#
+# Share Data and Attribute Caches
+# Sharecache=True
+#
+# The amount of time, in tenths of a seconds, the client
+# will wait for a response from the server before retransmitting
+# the request.
+# Timeo=600
+#
+# Sets all attributes times to the same time (in seconds)
+# actimeo=30
+#
+# Server Mountd port mountport
+# mountport=4001
+#
+# Server Mountd Protocol
+# mountproto=tcp
+#
+# Server Mountd Version
+# mountvers=3
+#
+# Server Mountd Host
+# mounthost=hostname
+#
+# Server Port
+# Port=2049
+#
+# RPCGSS security flavors
+# [none, sys, krb5, krb5i, krb5p ]
+# Sec=sys
+#
+# Allow Signals to interrupt file operations
+# Intr=True
+#
+# Specifies how the kernel manages its cache of directory
+# Lookupcache=all|none|pos|positive
+#
+# Turn of the caching of that access time
+# noatime=True
diff --git a/utils/mount/nfsmount.conf.man b/utils/mount/nfsmount.conf.man
new file mode 100644
index 0000000..34879c8
--- /dev/null
+++ b/utils/mount/nfsmount.conf.man
@@ -0,0 +1,131 @@
+.\" @(#)nfsmount.conf.5"
+.TH NFSMOUNT.CONF 5 "16 December 2020"
+.SH NAME
+nfsmount.conf - Configuration file for NFS mounts
+.SH SYNOPSIS
+Configuration file for NFS mounts that allows options
+to be set globally, per server or per mount point.
+.SH DESCRIPTION
+The configuration file is made up of multiple section headers
+followed by variable assignments associated with that section.
+A section header is defined by a string enclosed by
+.BR [
+and
+.BR ]
+brackets.
+Variable assignments are assignment statements that assign values
+to particular variables using the
+.BR =
+operator, as in
+.BR Proto=Tcp .
+The variables that can be assigned are the set of NFS specific
+mount options listed in
+.BR nfs (5)
+together with the filesystem-independant mount options listed in
+.BR mount (8)
+and three additions:
+.B Sloppy=True
+has the same effect as the
+.B -s
+option to
+.IR mount ,
+and
+.B Foreground=True
+and
+.B Background=True
+have the same effect as
+.B bg
+and
+.BR fg .
+.PP
+Options in the config file may be given in upper, lower, or mixed case
+and will be shifted to lower case before being passed to the filesystem.
+.PP
+Boolean mount options which do not need an equals sign must be given as
+.RI \[dq] option =True".
+Instead of preceeding such an option with
+.RB \[dq] no \[dq]
+its negation must be given as
+.RI \[dq] option =False".
+.PP
+Sections are broken up into three basic categories:
+Global options, Server options and Mount Point options.
+.HP
+.B [ NFSMount_Global_Options ]
+- This statically named section
+defines all of the global mount options that can be
+applied to every NFS mount.
+.HP
+.B [ Server \[dq]Server_Name\[dq] ]
+- This section defines all the mount options that should
+be used on mounts to a particular NFS server. The
+.I \[dq]Server_Name\[dq]
+strings needs to be surrounded by '\[dq]' and be an exact match
+(ignoring case) of the server name used in the
+.B mount
+command.
+.HP
+.B [ MountPoint \[dq]Mount_Point\[dq] ]
+- This section defines all the mount options that
+should be used on a particular mount point.
+The
+.I \[dq]Mount_Point\[dq]
+string needs to be surrounded by '\[dq]' and be an
+exact match of the mount point used in the
+.BR mount
+command. Though path names are usually case-sensitive, the Mount_Point
+name is matched insensitive to case.
+.PP
+The sections are processed in the reverse of the order listed above, and
+any options already seen, either in a previous section or on the
+command line, will be ignored when seen again.
+.SH EXAMPLES
+.PP
+These are some example lines of how sections and variables
+are defined in the configuration file.
+.PP
+[ NFSMount_Global_Options ]
+.br
+ Proto=Tcp
+.RS
+.PP
+The TCP/IPv4 protocol will be used on every NFS mount.
+.RE
+.PP
+[ Server \[dq]nfsserver.foo.com\[dq] ]
+.br
+ rsize=32k
+.br
+ wsize=32k
+.br
+ proto=udp6
+.RS
+.PP
+A 32k (32768 bytes) block size will be used as the read and write
+size on all mounts to the 'nfsserver.foo.com' server. UDP/IPv6
+is the protocol to be used.
+.RE
+.PP
+[ MountPoint \[dq]/export/home\[dq] ]
+.br
+ Background=True
+.RS
+.PP
+All mounts to the '/export/home' export will be performed in
+the background (i.e. done asynchronously).
+.RE
+.SH FILES
+.TP 10n
+.I /etc/nfsmount.conf
+Default NFS mount configuration file
+.TP 10n
+.I /etc/nfsmount.conf.d
+When this directory exists and files ending
+with ".conf" exist, those files will be
+used to set configuration variables. These
+files will override variables set
+in /etc/nfsmount.conf
+.PD
+.SH SEE ALSO
+.BR nfs (5),
+.BR mount (8),