~ubuntu-branches/ubuntu/precise/nfs-utils/precise-updates

« back to all changes in this revision

Viewing changes to utils/mountd/mountd.man

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-07-23 17:54:36 UTC
  • mfrom: (14.1.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110723175436-mu7zaa6637prifpq
* Merge from Debian unstable (LP: #728586, LP: #789117), remaining
  changes:
  - debian/nfs-common.{statd,statd-mounting,gssd,idmapd}.upstart,
    debian/control, debian/nfs-common.{preinst,postinst,prerm,postrm},
    debian/rules: drop nfs-common init script in favor of upstart jobs,
    and build-depend on debhelper (>= 7.3.15ubuntu3) for correct upstart
    init handling.
  - Depend on rpcbind (>= 0.2.0-6ubuntu1) for upstart support.
  - debian/nfs-kernel-server.postinst: don't call "invoke-rc.d nfs-common"
    in the postinst, this is redundant anyway and the nfs-common init script
    is gone now.
  - nfs-kernel-server.default:  Add comment about how to disable nfs4.
  - debian/patches/multiarch-kerberos-paths: Search for kerberos libs
    in multiarch locations.
  - nfs-kernel-server.init: Unmount nfsd fs when init script stops
  - ubuntu-fix-kernel-version-handling: avoid segfaults from short kernel
    version numbers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.\"
2
 
.\" mountd(8)
 
1
.\"@(#)rpc.mountd.8"
3
2
.\"
4
3
.\" Copyright (C) 1999 Olaf Kirch <okir@monad.swb.de>
5
4
.\" Modified by Paul Clements, 2004.
6
 
.TH rpc.mountd 8 "31 Aug 2004"
 
5
.\"
 
6
.TH rpc.mountd 8 "31 Dec 2009"
7
7
.SH NAME
8
8
rpc.mountd \- NFS mount daemon
9
9
.SH SYNOPSIS
11
11
.SH DESCRIPTION
12
12
The
13
13
.B rpc.mountd
14
 
program implements the NFS mount protocol. When receiving a MOUNT
15
 
request from an NFS client, it checks the request against the list of
16
 
currently exported file systems. If the client is permitted to mount
17
 
the file system,
 
14
daemon implements the server side of the NFS MOUNT protocol,
 
15
an NFS side protocol used by NFS version 2 [RFC1094] and NFS version 3 [RFC1813].
 
16
.PP
 
17
An NFS server maintains a table of local physical file systems
 
18
that are accessible to NFS clients.
 
19
Each file system in this table is referred to as an
 
20
.IR "exported file system" ,
 
21
or
 
22
.IR export ,
 
23
for short.
 
24
.PP
 
25
Each file system in the export table has an access control list.
18
26
.B rpc.mountd
19
 
obtains a file handle for requested directory and returns it to
20
 
the client.
21
 
.SS Exporting NFS File Systems
22
 
Making file systems available to NFS clients is called
23
 
.IR exporting .
24
 
.P
25
 
Usually, a file system and the hosts it should be made available to
26
 
are listed in the
27
 
.B /etc/exports
28
 
file, and invoking
29
 
.B exportfs -a
30
 
whenever the system is booted. The
 
27
uses these access control lists to determine
 
28
whether an NFS client is permitted to access a given file system.
 
29
For details on how to manage your NFS server's export table, see the
 
30
.BR exports (5)
 
31
and
31
32
.BR exportfs (8)
32
 
command makes export information available to both the kernel NFS
33
 
server module and the
34
 
.B rpc.mountd
35
 
daemon.
36
 
.P
37
 
Alternatively, you can export individual directories temporarily 
38
 
using
39
 
.BR exportfs 's
40
 
.IB host : /directory
41
 
syntax.
 
33
man pages.
 
34
.SS Mounting exported NFS File Systems
 
35
The NFS MOUNT protocol has several procedures.
 
36
The most important of these are
 
37
MNT (mount an export) and
 
38
UMNT (unmount an export).
 
39
.PP
 
40
A MNT request has two arguments: an explicit argument that
 
41
contains the pathname of the root directory of the export to be mounted,
 
42
and an implicit argument that is the sender's IP address.
 
43
.PP
 
44
When receiving a MNT request from an NFS client,
 
45
.B rpc.mountd
 
46
checks both the pathname and the sender's IP address against its export table.
 
47
If the sender is permitted to access the requested export,
 
48
.B rpc.mountd
 
49
returns an NFS file handle for the export's root directory to the client.
 
50
The client can then use the root file handle and NFS LOOKUP requests
 
51
to navigate the directory structure of the export.
42
52
.SS The rmtab File
43
 
For every mount request received from an NFS client,
44
 
.B rpc.mountd
45
 
adds an entry to the
46
 
.B /var/lib/nfs/rmtab
47
 
file. When receiving an unmount request, that entry is removed.
48
 
.P
49
 
However, this file is mostly ornamental. One, the client can continue
50
 
to use the file handle even after calling
51
 
.B rpc.mountd 's
52
 
UMOUNT procedure. And two, if a client reboots without notifying
53
 
.B rpc.mountd ,
54
 
a stale entry will remain in
55
 
.BR rmtab .
 
53
The
 
54
.B rpc.mountd
 
55
daemon registers every successful MNT request by adding an entry to the
 
56
.I /var/lib/nfs/rmtab
 
57
file.
 
58
When receivng a UMNT request from an NFS client,
 
59
.B rpc.mountd
 
60
simply removes the matching entry from
 
61
.IR /var/lib/nfs/rmtab ,
 
62
as long as the access control list for that export allows that sender
 
63
to access the export.
 
64
.PP
 
65
Clients can discover the list of file systems an NFS server is
 
66
currently exporting, or the list of other clients that have mounted
 
67
its exports, by using the
 
68
.BR showmount (8)
 
69
command.
 
70
.BR showmount (8)
 
71
uses other procedures in the NFS MOUNT protocol to report information
 
72
about the server's exported file systems.
 
73
.PP
 
74
Note, however, that there is little to guarantee that the contents of
 
75
.I /var/lib/nfs/rmtab
 
76
are accurate.
 
77
A client may continue accessing an export even after invoking UMNT.
 
78
If the client reboots without sending a UMNT request, stale entries
 
79
remain for that client in
 
80
.IR /var/lib/nfs/rmtab .
56
81
.SH OPTIONS
57
82
.TP
58
83
.B \-d kind " or " \-\-debug kind
81
106
.B rpc.mountd
82
107
do not offer certain versions of NFS. The current version of
83
108
.B rpc.mountd
84
 
can support both NFS version 2 and the newer version 3. If the
85
 
NFS kernel module was compiled without support for NFSv3,
 
109
can support both NFS version 2, 3 and 4. If the
 
110
either one of these version should not be offered,
86
111
.B rpc.mountd
87
112
must be invoked with the option
88
 
.B "\-\-no-nfs-version 3" .
 
113
.B "\-\-no-nfs-version <vers>" .
89
114
.TP
90
115
.B \-n " or " \-\-no-tcp
91
116
Don't advertise TCP for mount.
94
119
Ignored (compatibility with unfsd??).
95
120
.TP
96
121
.B \-p " or " \-\-port num
97
 
Force
 
122
Specifies the port number used for RPC listener sockets.
 
123
If this option is not specified,
98
124
.B rpc.mountd
99
 
to bind to the specified port num, instead of using the random port
100
 
number assigned by the portmapper.
 
125
chooses a random ephemeral port for each listener socket.
 
126
.IP
 
127
This option can be used to fix the port value of
 
128
.BR rpc.mountd 's
 
129
listeners when NFS MOUNT requests must traverse a firewall
 
130
between clients and servers.
101
131
.TP
102
132
.B \-H " or " \-\-ha-callout prog
103
 
Specify a high availability callout program, which will receive callouts
104
 
for all client mount and unmount requests. This allows 
 
133
Specify a high availability callout program.
 
134
This program receives callouts for all MOUNT and UNMOUNT requests.
 
135
This allows
105
136
.B rpc.mountd
106
 
to be used in a High Availability NFS (HA-NFS) environment. This callout is not
107
 
needed (and should not be used) with 2.6 and later kernels (instead,
108
 
mount the nfsd filesystem on
109
 
.B /proc/fs/nfsd
110
 
).
111
 
The program will be called with 4 arguments.
112
 
The first will be
 
137
to be used in a High Availability NFS (HA-NFS) environment.
 
138
.IP
 
139
The callout program is run with 4 arguments.
 
140
The first is
113
141
.B mount
114
142
or
115
143
.B unmount
118
146
The third will be the path that the client is mounting.
119
147
The last is the number of concurrent mounts that we believe the client
120
148
has of that path.
 
149
.IP
 
150
This callout is not needed with 2.6 and later kernels.
 
151
Instead, mount the nfsd filesystem on
 
152
.IR /proc/fs/nfsd .
121
153
.TP
122
154
.BI "\-s," "" " \-\-state\-directory\-path "  directory
123
 
specify a directory in which to place statd state information.
 
155
Specify a directory in which to place statd state information.
124
156
If this option is not specified the default of
125
 
.BR /var/lib/nfs
 
157
.I /var/lib/nfs
126
158
is used.
127
159
.TP
128
160
.BI "\-r," "" " \-\-reverse\-lookup"
129
 
mountd tracks IP addresses in the rmtab, and when a DUMP request is made (by
130
 
someone running showmount -a, for instance), it returns IP addresses instead
131
 
of hostnames by default. This option causes mountd to do a reverse
132
 
lookup on each IP address and return that hostname instead. Enabling this can
133
 
have a substantial negative effect on performance in some situations.
 
161
.B rpc.mountd
 
162
tracks IP addresses in the
 
163
.I rmtab
 
164
file.  When a DUMP request is made (by
 
165
someone running
 
166
.BR "showmount -a" ,
 
167
for instance), it returns IP addresses instead
 
168
of hostnames by default. This option causes
 
169
.B rpc.mountd
 
170
to perform a reverse lookup on each IP address and return that hostname instead.
 
171
Enabling this can have a substantial negative effect on performance
 
172
in some situations.
134
173
.TP
135
174
.BR "\-t N" " or " "\-\-num\-threads=N"
136
175
This option specifies the number of worker threads that rpc.mountd
162
201
flag, then the list of group ids received from the client will be
163
202
replaced by a list of group ids determined by an appropriate lookup on
164
203
the server. Note that the 'primary' group id is not affected so a
165
 
.I newgroup
 
204
.B newgroup
166
205
command on the client will still be effective.  This function requires
167
206
a Linux Kernel with version at least 2.6.21.
168
 
 
169
207
.SH TCP_WRAPPERS SUPPORT
170
 
This
171
 
.B rpc.mountd
172
 
version is protected by the
173
 
.B tcp_wrapper
174
 
library. You have to give the clients access to
175
 
.B rpc.mountd
176
 
if they should be allowed to use it. To allow connects from clients of
177
 
the .bar.com domain you could use the following line in /etc/hosts.allow:
178
 
 
179
 
mountd: .bar.com
180
 
 
181
 
You have to use the daemon name 
 
208
You can protect your
 
209
.B rpc.mountd
 
210
listeners using the
 
211
.B tcp_wrapper
 
212
library or
 
213
.BR iptables (8).
 
214
.PP
 
215
Note that the
 
216
.B tcp_wrapper
 
217
library supports only IPv4 networking.
 
218
.PP
 
219
Add the hostnames of NFS peers that are allowed to access
 
220
.B rpc.mountd
 
221
to
 
222
.IR /etc/hosts.allow .
 
223
Use the daemon name
182
224
.B mountd
183
 
for the daemon name (even if the binary has a different name).
184
 
.B Note:
185
 
hostnames used in either access file will be ignored when
 
225
even if the
 
226
.B rpc.mountd
 
227
binary has a different name.
 
228
.PP
 
229
Hostnames used in either access file will be ignored when
186
230
they can not be resolved into IP addresses.
187
 
 
188
 
For further information please have a look at the
 
231
For further information see the
189
232
.BR tcpd (8)
190
233
and
191
234
.BR hosts_access (5)
192
 
manual pages.
 
235
man pages.
 
236
.SS IPv6 and TI-RPC support
 
237
TI-RPC is a pre-requisite for supporting NFS on IPv6.
 
238
If TI-RPC support is built into
 
239
.BR rpc.mountd ,
 
240
it attempts to start listeners on network transports marked 'visible' in
 
241
.IR /etc/netconfig .
 
242
As long as at least one network transport listener starts successfully,
 
243
.B rpc.mountd
 
244
will operate.
 
245
.SH FILES
 
246
.TP 2.5i
 
247
.I /etc/exports
 
248
input file for
 
249
.BR exportfs ,
 
250
listing exports, export options, and access control lists
 
251
.TP 2.5i
 
252
.I /var/lib/nfs/rmtab
 
253
table of clients accessing server's exports
193
254
.SH SEE ALSO
194
 
.BR rpc.nfsd (8),
195
255
.BR exportfs (8),
196
256
.BR exports (5),
197
 
.BR rpc.rquotad (8).
198
 
.SH FILES
199
 
.BR /etc/exports ,
200
 
.BR /var/lib/nfs/xtab .
 
257
.BR showmount (8),
 
258
.BR rpc.nfsd (8),
 
259
.BR rpc.rquotad (8),
 
260
.BR nfs (5),
 
261
.BR tcpd (8),
 
262
.BR hosts_access (5),
 
263
.BR iptables (8),
 
264
.BR netconfig (5)
 
265
.sp
 
266
RFC 1094 - "NFS: Network File System Protocol Specification"
 
267
.br
 
268
RFC 1813 - "NFS Version 3 Protocol Specification"
201
269
.SH AUTHOR
202
270
Olaf Kirch, H. J. Lu, G. Allan Morris III, and a host of others.