2006-01-05 13:41:03 +03:00
|
|
|
.\" $NetBSD: mountd.8,v 1.32 2006/01/05 10:41:03 yamt Exp $
|
1995-03-18 17:54:19 +03:00
|
|
|
.\"
|
1994-06-08 23:27:32 +04:00
|
|
|
.\" Copyright (c) 1989, 1991, 1993
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
1993-03-21 12:45:37 +03:00
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
2003-08-07 15:25:11 +04:00
|
|
|
.\" 3. Neither the name of the University nor the names of its contributors
|
1993-03-21 12:45:37 +03:00
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
1996-02-18 14:57:50 +03:00
|
|
|
.\" @(#)mountd.8 8.4 (Berkeley) 4/28/95
|
1993-03-22 11:04:00 +03:00
|
|
|
.\"
|
2006-01-05 13:41:03 +03:00
|
|
|
.Dd January 5, 2006
|
1993-03-21 12:45:37 +03:00
|
|
|
.Dt MOUNTD 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm mountd
|
|
|
|
.Nd service remote
|
|
|
|
.Tn NFS
|
|
|
|
mount requests
|
|
|
|
.Sh SYNOPSIS
|
1997-09-14 06:26:14 +04:00
|
|
|
.Nm
|
2005-01-17 18:20:09 +03:00
|
|
|
.Op Fl dNn
|
2002-09-22 00:35:00 +04:00
|
|
|
.Op Fl P Ar policy
|
2005-09-20 02:43:13 +04:00
|
|
|
.Op Fl p Ar port
|
1993-03-21 12:45:37 +03:00
|
|
|
.Op Ar exportsfile
|
|
|
|
.Sh DESCRIPTION
|
1997-09-14 06:26:14 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
is the server for
|
|
|
|
.Tn NFS
|
|
|
|
mount requests from other client machines.
|
1997-09-14 06:26:14 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
listens for service requests at the port indicated in the
|
|
|
|
.Tn NFS
|
|
|
|
server specification; see
|
|
|
|
.%T "Network File System Protocol Specification" ,
|
2003-09-07 20:22:20 +04:00
|
|
|
RFC 1094, Appendix A and
|
1996-02-18 14:57:50 +03:00
|
|
|
.%T "NFS: Network File System Version 3 Protocol Specification" ,
|
|
|
|
Appendix I.
|
1993-03-21 12:45:37 +03:00
|
|
|
.Pp
|
|
|
|
Options and operands available for
|
|
|
|
.Nm mountd :
|
|
|
|
.Bl -tag -width Ds
|
2005-01-17 18:20:09 +03:00
|
|
|
.It Fl d
|
|
|
|
Enable debugging mode.
|
2002-09-22 00:35:00 +04:00
|
|
|
.Nm
|
2005-01-17 18:20:09 +03:00
|
|
|
will not detach from the controlling terminal and will print
|
|
|
|
debugging messages to stderr.
|
2005-01-14 19:12:46 +03:00
|
|
|
.It Fl N
|
|
|
|
Do not require privileged ports for mount or NFS RPC calls.
|
|
|
|
This option is equivalent to specifying
|
|
|
|
.Dq -noresvport -noresvmnt
|
|
|
|
on every export.
|
|
|
|
See
|
|
|
|
.Xr exports 5
|
|
|
|
for more information.
|
1993-03-21 12:45:37 +03:00
|
|
|
.It Fl n
|
1998-07-16 02:00:59 +04:00
|
|
|
This flag used to indicate that clients were required to make requests
|
|
|
|
from reserved ports, but it is now no longer functional. It
|
|
|
|
is only provided for backwards compatibility. Requests
|
1997-03-23 23:58:14 +03:00
|
|
|
are checked for reserved ports on a per-export basis, see
|
|
|
|
.Xr exports 5 .
|
2005-01-17 18:20:09 +03:00
|
|
|
.It Fl P Ar policy
|
|
|
|
IPsec
|
|
|
|
.Ar policy
|
|
|
|
string,
|
|
|
|
as described in
|
|
|
|
.Xr ipsec_set_policy 3 .
|
|
|
|
Multiple IPsec policy strings may be specified by using a semicolon as
|
|
|
|
a separator. If conflicting policy strings are found in a single line,
|
|
|
|
the last string will take effect. If an invalid IPsec policy string is used
|
|
|
|
.Nm
|
|
|
|
logs an error message and terminates itself.
|
2005-09-20 02:43:13 +04:00
|
|
|
.It Fl p Ar port
|
|
|
|
Force
|
|
|
|
.Nm
|
|
|
|
to bind to the given port. If this
|
|
|
|
option is not given,
|
|
|
|
.Nm
|
|
|
|
may bind to every anonymous port
|
|
|
|
(in the range 600-1023) which causes trouble when trying to use
|
|
|
|
NFS through a firewall.
|
2005-09-19 04:59:56 +04:00
|
|
|
.It Ar exportsfile
|
|
|
|
The
|
|
|
|
.Ar exportsfile
|
|
|
|
argument specifies an alternative location
|
|
|
|
for the exports file.
|
1993-03-21 12:45:37 +03:00
|
|
|
.El
|
|
|
|
.Pp
|
1997-09-14 06:26:14 +04:00
|
|
|
When
|
|
|
|
.Nm
|
|
|
|
is started,
|
1994-06-08 23:27:32 +04:00
|
|
|
it loads the export host addresses and options into the kernel
|
1998-04-28 08:07:04 +04:00
|
|
|
using the
|
Apply the NFS exports list rototill patch:
- Remove all NFS related stuff from file system specific code.
- Drop the vfs_checkexp hook and generalize it in the new nfs_check_export
function, thus removing redundancy from all file systems.
- Move all NFS export-related stuff from kern/vfs_subr.c to the new
file sys/nfs/nfs_export.c. The former was becoming large and its code
is always compiled, regardless of the build options. Using the latter,
the code is only compiled in when NFSSERVER is enabled. While doing this,
also make some functions in nfs_subs.c conditional to NFSSERVER.
- Add a new command in nfssvc(2), called NFSSVC_SETEXPORTSLIST, that takes a
path and a set of export entries. At the moment it can only clear the
exports list or append entries, one by one, but it is done in a way that
allows setting the whole set of entries atomically in the future (see the
comment in mountd_set_exports_list or in doc/TODO).
- Change mountd(8) to use the nfssvc(2) system call instead of mount(2) so
that it becomes file system agnostic. In fact, all this whole thing was
done to remove a 'XXX' block from this utility!
- Change the mount*, newfs and fsck* userland utilities to not deal with NFS
exports initialization; done internally by the kernel when initializing
the NFS support for each file system.
- Implement an interface for VFS (called VFS hooks) so that several kernel
subsystems can run arbitrary code upon receipt of specific VFS events.
At the moment, this only provides support for unmount and is used to
destroy NFS exports lists from the file systems being unmounted, though it
has room for extension.
Thanks go to yamt@, chs@, thorpej@, wrstuden@ and others for their comments
and advice in the development of this patch.
2005-09-23 16:10:31 +04:00
|
|
|
.Xr nfssvc 2
|
1998-04-28 08:07:04 +04:00
|
|
|
system call.
|
1994-06-08 23:27:32 +04:00
|
|
|
After changing the exports file,
|
1997-09-14 06:26:14 +04:00
|
|
|
a hangup signal should be sent to the
|
|
|
|
.Nm
|
|
|
|
daemon to get it to reload the export information.
|
1994-06-08 23:27:32 +04:00
|
|
|
After sending the SIGHUP
|
1994-09-24 03:18:36 +04:00
|
|
|
(kill \-s HUP `cat /var/run/mountd.pid`),
|
1997-09-14 06:26:14 +04:00
|
|
|
check the syslog output to see if
|
|
|
|
.Nm
|
|
|
|
logged any parsing errors in the exports file.
|
1998-10-07 18:51:36 +04:00
|
|
|
.Pp
|
|
|
|
After receiving SIGTERM,
|
|
|
|
.Nm
|
|
|
|
sends a broadcast request to remove the mount list from all the clients.
|
|
|
|
This can take a long time, since the broadcast request waits for each
|
|
|
|
client to respond.
|
1993-03-21 12:45:37 +03:00
|
|
|
.Sh FILES
|
1994-06-08 23:27:32 +04:00
|
|
|
.Bl -tag -width /var/run/mountd.pid -compact
|
1993-03-21 12:45:37 +03:00
|
|
|
.It Pa /etc/exports
|
1994-06-08 23:27:32 +04:00
|
|
|
the list of exported filesystems
|
|
|
|
.It Pa /var/run/mountd.pid
|
1997-09-14 06:26:14 +04:00
|
|
|
the pid of the currently running
|
|
|
|
.Nm
|
2006-01-05 13:41:03 +03:00
|
|
|
.It Pa /var/db/mountdtab
|
|
|
|
the list of remotely mounted filesystems
|
1993-03-21 12:45:37 +03:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr nfsstat 1 ,
|
Apply the NFS exports list rototill patch:
- Remove all NFS related stuff from file system specific code.
- Drop the vfs_checkexp hook and generalize it in the new nfs_check_export
function, thus removing redundancy from all file systems.
- Move all NFS export-related stuff from kern/vfs_subr.c to the new
file sys/nfs/nfs_export.c. The former was becoming large and its code
is always compiled, regardless of the build options. Using the latter,
the code is only compiled in when NFSSERVER is enabled. While doing this,
also make some functions in nfs_subs.c conditional to NFSSERVER.
- Add a new command in nfssvc(2), called NFSSVC_SETEXPORTSLIST, that takes a
path and a set of export entries. At the moment it can only clear the
exports list or append entries, one by one, but it is done in a way that
allows setting the whole set of entries atomically in the future (see the
comment in mountd_set_exports_list or in doc/TODO).
- Change mountd(8) to use the nfssvc(2) system call instead of mount(2) so
that it becomes file system agnostic. In fact, all this whole thing was
done to remove a 'XXX' block from this utility!
- Change the mount*, newfs and fsck* userland utilities to not deal with NFS
exports initialization; done internally by the kernel when initializing
the NFS support for each file system.
- Implement an interface for VFS (called VFS hooks) so that several kernel
subsystems can run arbitrary code upon receipt of specific VFS events.
At the moment, this only provides support for unmount and is used to
destroy NFS exports lists from the file systems being unmounted, though it
has room for extension.
Thanks go to yamt@, chs@, thorpej@, wrstuden@ and others for their comments
and advice in the development of this patch.
2005-09-23 16:10:31 +04:00
|
|
|
.Xr nfssvc 2 ,
|
1993-03-21 12:45:37 +03:00
|
|
|
.Xr exports 5 ,
|
|
|
|
.Xr nfsd 8 ,
|
2000-07-03 14:06:24 +04:00
|
|
|
.Xr rpcbind 8 ,
|
1993-03-21 12:45:37 +03:00
|
|
|
.Xr showmount 8
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
1997-09-14 06:26:14 +04:00
|
|
|
.Nm
|
1998-02-06 08:54:12 +03:00
|
|
|
utility first appeared in
|
|
|
|
.Bx 4.4 .
|