NFSUSERD(8)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’… NFSUSERD(8) β€” the nfsuserd page, bestie edition πŸŽ€

okay so this is nfsuserd from the System Manager's Manual, and honestly? she's doing a LOT. let's get into it ✨


🌸 NAME 🌸

nfsuserd β€” loads user and group info into the kernel for NFSv4 services, plus she supports manage-gids for literally all NFS versions. multi-talented queen πŸ‘‘


✨ SYNOPSIS ✨

nfsuserd [-domain domain_name] [-usertimeout minutes]
         [-usermax max_cache_size] [-verbose] [-force] [-manage-gids]
         [num_servers]

πŸ’– DESCRIPTION πŸ’–

so what does she actually do? nfsuserd loads user and group information into the kernel for NFSv4. that's the whole vibe.

for Kerberized NFSv4 mounts? she must be running on both the client(s) AND the server or things will not work. no cap. 😀

for non-Kerberized NFSv4 mounts, this daemon still has to be running β€” unless all the client(s) plus the server are configured to put uid/gid numbers in the owner and owner_group strings. like, that's the only escape hatch, bestie.

she also provides support for manage-gids, and must be running on the server if that's being used for any version of NFS. any. version. 🫢


🌈 what happens on startup 🌈

upon startup she loads the machine's DNS domain name, plus the timeout and the cache size limit, into the kernel. then she preloads the cache with group and user information, up to the cache size limit, and forks off num_servers (default 4) children β€” those children are the servers that service requests from the kernel for cache misses πŸ”₯

the master is there for the sole purpose of terminating the servers. that's it. that's her job. iconic honestly.

to stop the nfsuserd, send a SIGUSR1 to the master πŸ’€

πŸ‘‘ the options (yes, all of them) πŸ‘‘

the following options are available:

  • -domain domain_name β€” lets you override the default DNS domain name, which is normally acquired by taking either the suffix on the machine's hostname or, if that name is not a fully qualified host name, the canonical name as reported by getaddrinfo(3). override queen πŸ’…
  • -usertimeout minutes β€” overrides the default timeout for cache entries, in minutes. the longer the timeout, the better the performance, BUT the longer it takes for replaced entries to be seen. so if your user/group database management system almost never re-uses the same names or id numbers, a large timeout is the move. default is 1 minute ⏱️
  • -usermax max_cache_size β€” overrides the default upper bound on the cache size. bigger cache = more kernel memory used, but better performance. if your system can afford the memory use, make this the sum of the number of entries in your group and password databases. default is 200 entries πŸ“
  • -verbose β€” when set, the server logs a bunch of information to syslog. she's a talker πŸ’¬
  • -force β€” this flag option must be set to restart the daemon after it has gone away abnormally and refuses to start, because it thinks nfsuserd is already running. she's being dramatic, force her πŸ™ˆ
  • -manage-gids β€” this flag enables manage-gids for the NFS server nfsd(8). when this is enabled, all NFS requests using AUTH_SYS authentication take the uid from the RPC request and use the group list for that uid provided by getgrouplist(3) on the server, instead of the list of groups provided in the RPC authenticator. the whole point? avoiding the 16 group limit for AUTH_SYS. slay πŸŽ€
  • num_servers β€” specifies how many servers to create (max 20). the default of 4 may be sufficient. you should run enough servers so that ps(1) shows almost no running time for one or two of the servers after the system has been running for a long period. running too few will have a major performance impact, whereas running too many will only tie up some resources, such as a process table entry and swap space. balance, bestie βš–οΈ

πŸ¦‹ SEE ALSO πŸ¦‹

getgrent(3), getgrouplist(3), getpwent(3), nfsv4(4), group(5), passwd(5), nfsd(8)


⭐ HISTORY ⭐

the nfsuserd utility was introduced with the NFSv4 experimental subsystem in 2009. vintage. she's been doing this πŸ’œ


πŸ’€ BUGS πŸ’€

the nfsuserd use getgrent(3), getgrouplist(3) and getpwent(3) library calls to resolve requests, and will hang if the servers handling those requests fail and the library functions don't return. 😭 see group(5) and passwd(5) for more info on how the databases are accessed.


and that's the whole page, bestie β€” you ate that reading session fr fr πŸ’– this one's from Debian, dated April 22, 2023, and it's the NFSUSERD(8) manpage, signing off 🫢✨

πŸ“¦ where this page comes from