Commit | Line | Data |
---|---|---|
984263bc MD |
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. | |
dc71b7ab | 12 | .\" 3. Neither the name of the University nor the names of its contributors |
984263bc MD |
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 | |
1dc7b4d6 | 29 | .\" $FreeBSD: head/usr.sbin/mountd/mountd.8 172827 2007-10-20 11:25:34Z matteo $ |
984263bc | 30 | .\" |
356c161f | 31 | .Dd December 1, 2014 |
984263bc MD |
32 | .Dt MOUNTD 8 |
33 | .Os | |
34 | .Sh NAME | |
35 | .Nm mountd | |
36 | .Nd service remote | |
37 | .Tn NFS | |
38 | mount requests | |
39 | .Sh SYNOPSIS | |
40 | .Nm | |
41 | .Op Fl 2dlnr | |
2eb4cd83 | 42 | .Op Fl h Ar bindip |
ad944d0d | 43 | .Op Fl p Ar port |
356c161f | 44 | .Op Ar exportsfile ... |
984263bc MD |
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" , | |
cabeba47 | 54 | RFC 1094, Appendix A and |
984263bc MD |
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. | |
2eb4cd83 AHJ |
67 | .It Fl h Ar bindip |
68 | Specify specific IP addresses to bind to for TCP and UDP requests. | |
69 | This option may be specified multiple times. | |
70 | If no | |
71 | .Fl h | |
72 | option is specified, | |
73 | .Nm | |
74 | will bind to | |
75 | .Dv INADDR_ANY . | |
76 | Note that when specifying IP addresses with | |
77 | .Fl h , | |
78 | .Nm | |
79 | will automatically add | |
80 | .Li 127.0.0.1 | |
81 | and if IPv6 is enabled, | |
82 | .Li ::1 | |
83 | to the list. | |
984263bc MD |
84 | .It Fl l |
85 | Cause all succeeded | |
86 | .Nm | |
87 | requests to be logged. | |
88 | .It Fl n | |
89 | Allow non-root mount requests to be served. | |
90 | This should only be specified if there are clients such as PC's, | |
91 | that require it. | |
e9c76aaf SW |
92 | It will automatically clear the |
93 | .Va vfs.nfs.nfs_privport | |
94 | sysctl flag, which | |
984263bc | 95 | controls if the kernel will accept NFS requests from reserved ports only. |
ad944d0d AHJ |
96 | .It Fl p Ar port |
97 | Force | |
98 | .Nm | |
99 | to bind to the specified port, for both | |
100 | .Vt AF_INET | |
101 | and | |
102 | .Vt AF_INET6 | |
103 | address families. | |
104 | This is typically done to ensure that the port which | |
105 | .Nm | |
106 | binds to is a known quantity which can be used in firewall rulesets. | |
107 | If | |
108 | .Nm | |
109 | cannot bind to this port, an appropriate error will be recorded in | |
110 | the system log, and the daemon will then exit. | |
984263bc MD |
111 | .It Fl r |
112 | Allow mount RPCs requests for regular files to be served. | |
113 | Although this seems to violate the mount protocol specification, | |
114 | some diskless workstations do mount requests for | |
115 | their swapfiles and expect them to be regular files. | |
116 | Since a regular file cannot be specified in | |
117 | .Pa /etc/exports , | |
118 | the entire file system in which the swapfiles resides | |
119 | will have to be exported with the | |
120 | .Fl alldirs | |
121 | flag. | |
122 | .It Ar exportsfile | |
123 | Specify an alternate location | |
124 | for the exports file. | |
356c161f | 125 | There can many exports files. |
984263bc MD |
126 | .El |
127 | .Pp | |
128 | When | |
129 | .Nm | |
130 | is started, | |
131 | it loads the export host addresses and options into the kernel | |
132 | using the | |
133 | .Xr mount 2 | |
134 | system call. | |
135 | After changing the exports file, | |
136 | a hangup signal should be sent to the | |
137 | .Nm | |
138 | daemon | |
139 | to get it to reload the export information. | |
62f7f702 SW |
140 | After sending the |
141 | .Dv SIGHUP | |
984263bc MD |
142 | (kill \-s HUP `cat /var/run/mountd.pid`), |
143 | check the syslog output to see if | |
144 | .Nm | |
145 | logged any parsing | |
146 | errors in the exports file. | |
147 | .Pp | |
148 | If | |
149 | .Nm | |
150 | detects that the running kernel does not include | |
151 | .Tn NFS | |
152 | support, it will attempt to load a loadable kernel module containing | |
153 | .Tn NFS | |
154 | code, using | |
155 | .Xr kldload 8 | |
156 | by way of | |
157 | .Xr vfsload 3 . | |
158 | If this fails, or no | |
159 | .Tn NFS | |
160 | KLD was available, | |
161 | .Nm | |
162 | exits with an error. | |
163 | .Sh FILES | |
164 | .Bl -tag -width /var/run/mountd.pid -compact | |
165 | .It Pa /etc/exports | |
166 | the list of exported filesystems | |
167 | .It Pa /var/run/mountd.pid | |
168 | the pid of the currently running mountd | |
169 | .It Pa /var/db/mountdtab | |
170 | the current list of remote mounted filesystems | |
171 | .El | |
172 | .Sh SEE ALSO | |
173 | .Xr nfsstat 1 , | |
174 | .Xr exports 5 , | |
175 | .Xr kldload 8 , | |
176 | .Xr nfsd 8 , | |
3b813696 | 177 | .Xr rpcbind 8 , |
984263bc MD |
178 | .Xr showmount 8 |
179 | .Sh HISTORY | |
180 | The | |
181 | .Nm | |
182 | utility first appeared in | |
183 | .Bx 4.4 . |