xref: /freebsd/usr.sbin/nfsuserd/nfsuserd.8 (revision d1a0d267b78b542fbd7e6553af2493760f49bfa8)
1.\" Copyright (c) 2009 Rick Macklem, University of Guelph
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd April 25, 2009
28.Dt NFSUSERD 8
29.Os
30.Sh NAME
31.Nm nfsuserd
32.Nd load user and group information into the kernel for
33.Tn NFSv4
34services
35.Sh SYNOPSIS
36.Nm nfsuserd
37.Op Fl domain Ar domain_name
38.Op Fl usertimeout Ar minutes
39.Op Fl usermax Ar max_cache_size
40.Op Fl verbose
41.Op Fl force
42.Op Ar num_servers
43.Sh DESCRIPTION
44.Nm
45loads user and group information into the kernel for NFSv4.
46It must be running for NFSv4 to function correctly, either client or server.
47.Pp
48Upon startup, it loads the machines DNS domain name, plus timeout and
49cache size limit into the kernel. It then preloads the cache with group
50and user information, up to the cache size limit and forks off N children
51(default 4), that service requests from the kernel for cache misses. The
52master server is there for the sole purpose of killing off the slaves.
53To stop the nfsuserd, send a SIGUSR1 to the master server.
54.Pp
55The following options are available:
56.Bl -tag -width Ds
57.It Fl domain Ar domain_name
58This option allows you to override the default DNS domain name, which
59is acquired by taking either the suffix on the machine's hostname or,
60if that name is not a fully qualified host name, the canonical name as
61reported by
62.Xr getaddrinfo 3 .
63.It Fl usertimeout Ar minutes
64Overrides the default timeout for cache entries, in minutes. If the
65timeout is specified as 0, cache entries never time out. The longer the
66time out, the better the performance, but the longer it takes for replaced
67entries to be seen. If your user/group database management system almost
68never re-uses the same names or id numbers, a large timeout is recommended.
69The default is 1 minute.
70.It Fl usermax Ar max_cache_size
71Overrides the default upper bound on the cache size. The larger the cache,
72the more kernel memory is used, but the better the performance. If your
73system can afford the memory use, make this the sum of the number of
74entries in your group and password databases.
75The default is 200 entries.
76.It Fl verbose
77When set, the server logs a bunch of information to syslog.
78.It Fl force
79This flag option must be set to restart the daemon after it has gone away
80abnormally and refuses to start, because it thinks nfsuserd is already
81running.
82.It Ar num_servers
83Specifies how many servers to create (max 20).
84The default of 4 may be sufficient. You should run enough servers, so that
85.Xr ps 1
86shows almost no running time for one or two of the slaves after the system
87has been running for a long period. Running too few will have a major
88performance impact, whereas running too many will only tie up some resources,
89such as a process table entry and swap space.
90.El
91.Sh SEE ALSO
92.Xr getgrent 3 ,
93.Xr getpwent 3 ,
94.Xr nfsv4 4 ,
95.Xr group 5 ,
96.Xr passwd 5 ,
97.Xr nfsd 8
98.Sh HISTORY
99The
100.Nm
101utility was introduced with the NFSv4 experimental subsystem in 2009.
102.Sh BUGS
103The
104.Nm
105use
106.Xr getgrent 3
107and
108.Xr getpwent 3
109library calls to resolve requests and will hang if the servers handling
110those requests fail and the library functions don't return. See
111.Xr group 5
112and
113.Xr passwd 5
114for more information on how the databases are accessed.
115