NFS.CONF(5)

๐Ÿ’– NFS.CONF(5) ๐Ÿ’–

okay bestie, sit down, hydrate, because we're about to talk about nfs.conf โ€” the general configuration for NFS daemons and tools, straight out of the File Formats Manual. this is the one that makes all your NFS stuff behave. it's giving central nervous system. it's giving group chat admin. let's go ๐Ÿฆ‹


โœจ SYNOPSIS โœจ

/usr/etc/nfs.conf /usr/etc/nfs.conf.d/ /etc/nfs.conf /etc/nfs.conf.d/

๐ŸŒธ DESCRIPTION ๐ŸŒธ

so these files? they hold your site-specific configuration for a whole bunch of NFS daemons and other processes. and yes, most config can also be passed to processes via command line arguments, but honestly? having one central file is just easier. it's the "one shared doc instead of 47 scattered DMs" of the Unix world. especially because it encourages consistent configuration across different processes. slay.

now the rules of the road:

  • when command line options are provided, they override values set in this file. no cap.
  • when this file doesn't specify a particular parameter, and no command line option is provided, each tool just does its own thing and provides its own default values. iconic behavior honestly.

the file format supports multiple sections, and each section can hold multiple value assignments. here's the tea:

a section is introduced by a line containing the section name enclosed in square brackets, so

[global]

would introduce a section called global. a value assignment is a single line that has the name of the value, an equals sign, and a setting for the value, so

threads = 4

would set the value named threads in the current section to 4. leading and trailing spaces and tab are ignored, as are spaces and tabs surrounding the equals sign. single and double quotes surrounding the assigned value are also removed. and if the resulting string is empty? the whole assignment is just ignored. bye ๐Ÿ’…

any line starting with # or ; is ignored, as is any blank line. we love a low-effort comment.

if the assigned value started with a $ then the remainder is treated as a name and looked for in the section [environment] or in the processes environment (see environ(7)). the value found is used for this value. cute little variable expansion moment โœจ

the value name include is special. if a section contains

include = /some/file/name

then the named file will be read, and any value assignments found therein will be added to the current section. and if the file contains section headers, then new sections will be created just as if the included file appeared in place of the include line. if the file name starts with a hyphen then that is stripped off before the file is opened, and if file doesn't exist no warning is given. normally, a non-existent include file generates a warning. so like... the hyphen is the "don't @ me" flag. noted ๐Ÿซถ

lookup of section and value names is case-insensitive. we're chill like that.

booleans, because everyone asks: where a Boolean value is expected, any of true, t, yes, y, on, or 1 can be used for "true", while false, f, no, n, off, or 0 can be used for "false". comparisons are case-insensitive. so many ways to say yes. very me.


๐Ÿ‘‘ SECTIONS ๐Ÿ‘‘

the following sections are known to various programs, and can contain the given named values. most sections can also contain a debug value, which can be one or more from the list general, call, auth, parse, all. when a list is given, the members should be comma-separated. the values 0 and 1 are also accepted, with '0' making no changes to the debug level, and '1' equivalent to specifying 'all'. yes bestie, 1 = everything, 0 = touch nothing. we love a shortcut.

  • general โ€” recognized values: pipefs-directory. see blkmapd(8), rpc.idmapd(8), and rpc.gssd(8) for details. ๐Ÿงš
  • exports โ€” recognized values: rootdir. setting rootdir to a valid path causes the nfs server to act as if the supplied path is being prefixed to all the exported entries. for instance, if rootdir=/my/root, and there is an entry in /etc/exports for /filesystem, then the client will be able to mount the path as /filesystem, but on the server, this will resolve to the path /my/root/filesystem. it's the โœจillusionโœจ of the path you wanted.
  • exportd โ€” recognized values: manage-gids, threads, cache-use-ipaddr, ttl, state-directory-path. see exportd(8) for details. note that setting "debug = auth" for exportd is equivalent to providing the --log-auth option.
  • nfsd โ€” recognized values: threads, min-threads, host, scope, port, grace-time, lease-time, udp, tcp, vers3, vers4, vers4.0, vers4.1, vers4.2, rdma, fh-key-file,. version and protocol values are Boolean values as described above, and are also used by rpc.mountd. threads, min-threads and the two times are integers. port and rdma are service names or numbers. see rpc.nfsd(8) for details. ๐Ÿ”ฅ
  • mountd โ€” recognized values: manage-gids, descriptors, port, threads, reverse-lookup, cache-use-ipaddr, ttl, state-directory-path, ha-callout. these, together with the protocol and version values in the [nfsd] section, are used to configure mountd. see rpc.mountd(8) for details. note that setting "debug = auth" for mountd is equivalent to providing the --log-auth option. also!! the state-directory-path value in the [mountd] section is also used by exportfs(8). shared custody, we love to see it.
  • statd โ€” recognized values: port, outgoing-port, name, state-directory-path, ha-callout. see rpc.statd(8) for details.
  • lockd โ€” recognized values: port and udp-port. see rpc.statd(8) for details. (yes, that's the same manpage as statd. not a typo, it's just how it is ๐Ÿ’€)
  • sm-notify โ€” recognized values: retry-time, outgoing-port, and outgoing-addr. see sm-notify(8) for details.
  • gssd โ€” recognized values: verbosity, rpc-verbosity, use-memcache, use-machine-creds, use-gss-proxy, avoid-dns, allowed-enctypes, context-timeout, rpc-timeout, keytab-file, cred-cache-directory, preferred-realm, set-home. see rpc.gssd(8) for details. that's a lot of values and honestly? she ate.
  • svcgssd โ€” recognized values: principal. see rpc.svcgssd(8) for details.
  • exportfs โ€” only debug= is recognized. one single value. minimalism. main character energy.
  • nfsrahead โ€” recognized values: nfs, nfsv4, default. see nfsrahead(5) for details. ๐ŸŒˆ

๐ŸŽ€ FILES ๐ŸŽ€

/usr/etc/nfs.conf
/usr/etc/nfs.conf.d/*.conf
/etc/nfs.conf
/etc/nfs.conf.d/*.conf

various configuration files read in order. later settings override earlier settings. so the last one to speak wins. periodt. ๐Ÿ’…


๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

rpc.nfsd(8), rpc.mountd(8), nfsmount.conf(5).


and that's the whole page bestie, you now know nfs.conf better than people who read it for a living. go forth and configure responsibly ๐Ÿ’–

kisses, from the NFS.CONF(5) page in the File Formats Manual โ€” see you at the bottom of the manpage, where the footer lives ๐Ÿ’œ

๐Ÿ“ฆ where this page comes from