mountd - Add new option -p <port>
[dragonfly.git] / sbin / mountd / mountd.8
1 .\" Copyright (c) 1989, 1991, 1993
2 .\"     The Regents of the University of California.  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 .\" 3. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)mountd.8    8.4 (Berkeley) 4/28/95
29 .\" $FreeBSD: src/sbin/mountd/mountd.8,v 1.16.2.2 2000/12/08 14:04:02 ru Exp $
30 .\" $DragonFly: src/sbin/mountd/mountd.8,v 1.5 2008/05/09 20:31:04 swildner Exp $
31 .\"
32 .Dd November 30, 2014
33 .Dt MOUNTD 8
34 .Os
35 .Sh NAME
36 .Nm mountd
37 .Nd service remote
38 .Tn NFS
39 mount requests
40 .Sh SYNOPSIS
41 .Nm
42 .Op Fl 2dlnr
43 .Op Fl p Ar port
44 .Op Ar exportsfile
45 .Sh DESCRIPTION
46 .Nm Mountd
47 is the server for
48 .Tn NFS
49 mount requests from other client machines.
50 It listens for service requests at the port indicated in the
51 .Tn NFS
52 server specification; see
53 .%T "Network File System Protocol Specification" ,
54 RFC 1094, Appendix A and
55 .%T "NFS: Network File System Version 3 Protocol Specification" ,
56 Appendix I.
57 .Pp
58 The following options are available:
59 .Bl -tag -width indent
60 .It Fl 2
61 Allow the administrator to force clients to use only the
62 version 2
63 .Tn NFS
64 protocol to mount filesystems from this server.
65 .It Fl d
66 Output debugging information.
67 .It Fl l
68 Cause all succeeded
69 .Nm
70 requests to be logged.
71 .It Fl n
72 Allow non-root mount requests to be served.
73 This should only be specified if there are clients such as PC's,
74 that require it.
75 It will automatically clear the
76 .Va vfs.nfs.nfs_privport
77 sysctl flag, which
78 controls if the kernel will accept NFS requests from reserved ports only.
79 .It Fl p Ar port
80 Force
81 .Nm
82 to bind to the specified port, for both
83 .Vt AF_INET
84 and
85 .Vt AF_INET6
86 address families.
87 This is typically done to ensure that the port which
88 .Nm
89 binds to is a known quantity which can be used in firewall rulesets.
90 If
91 .Nm
92 cannot bind to this port, an appropriate error will be recorded in
93 the system log, and the daemon will then exit.
94 .It Fl r
95 Allow mount RPCs requests for regular files to be served.
96 Although this seems to violate the mount protocol specification,
97 some diskless workstations do mount requests for
98 their swapfiles and expect them to be regular files.
99 Since a regular file cannot be specified in
100 .Pa /etc/exports ,
101 the entire file system in which the swapfiles resides
102 will have to be exported with the
103 .Fl alldirs
104 flag.
105 .It Ar exportsfile
106 Specify an alternate location
107 for the exports file.
108 .El
109 .Pp
110 When
111 .Nm
112 is started,
113 it loads the export host addresses and options into the kernel
114 using the
115 .Xr mount 2
116 system call.
117 After changing the exports file,
118 a hangup signal should be sent to the
119 .Nm
120 daemon
121 to get it to reload the export information.
122 After sending the
123 .Dv SIGHUP
124 (kill \-s HUP `cat /var/run/mountd.pid`),
125 check the syslog output to see if
126 .Nm
127 logged any parsing
128 errors in the exports file.
129 .Pp
130 If
131 .Nm
132 detects that the running kernel does not include
133 .Tn NFS
134 support, it will attempt to load a loadable kernel module containing
135 .Tn NFS
136 code, using
137 .Xr kldload 8
138 by way of
139 .Xr vfsload 3 .
140 If this fails, or no
141 .Tn NFS
142 KLD was available,
143 .Nm
144 exits with an error.
145 .Sh FILES
146 .Bl -tag -width /var/run/mountd.pid -compact
147 .It Pa /etc/exports
148 the list of exported filesystems
149 .It Pa /var/run/mountd.pid
150 the pid of the currently running mountd
151 .It Pa /var/db/mountdtab
152 the current list of remote mounted filesystems
153 .El
154 .Sh SEE ALSO
155 .Xr nfsstat 1 ,
156 .Xr exports 5 ,
157 .Xr kldload 8 ,
158 .Xr nfsd 8 ,
159 .Xr rpcbind 8 ,
160 .Xr showmount 8
161 .Sh HISTORY
162 The
163 .Nm
164 utility first appeared in
165 .Bx 4.4 .