NetBSD/dist/am-utils/fixmount/fixmount.8
2003-03-09 01:38:38 +00:00

162 lines
5.4 KiB
Groff

.\" $NetBSD: fixmount.8,v 1.6 2003/03/09 01:38:45 christos Exp $
.\"
.\"
.\" Copyright (c) 1997-2003 Erez Zadok
.\" Copyright (c) 1990 Jan-Simon Pendry
.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to Berkeley by
.\" Jan-Simon Pendry at Imperial College, London.
.\"
.\" 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.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgment:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" 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.
.\"
.\" %W% (Berkeley) %G%
.\"
.\" Id: fixmount.8,v 1.7 2002/12/27 22:44:05 ezk Exp
.\"
.TH FIXMOUNT 8 "26 Feb 1993"
.SH NAME
fixmount \- fix remote mount entries
.SH SYNOPSIS
.B fixmount
[
.B \-adervq
]
[
.B \-h
.I name
]
.I host
\&...
.SH DESCRIPTION
.IX "fixmount command" "" "\fLfixmount\fP \(em fix remote mount entries"
.LP
.B fixmount
is a variant of
.BR showmount (8)
that can delete bogus mount entries in remote
.BR mountd (8)
daemons.
The actions specified by the options are performed for each
.I host
in turn.
.SH OPTIONS
.TP
.B \-a \-d \-e
These options work as in
.BR showmount (8)
except that only entries pertaining to the local host are printed.
.TP
.B \-r
Removes those remote mount entries on
.I host
that do not correspond to current mounts, i.e., which are left-over
from a crash or are the result of improper mount protocol.
The actuality of mounts is verified using the entries in
.BR /etc/mtab .
.TP
.B \-v
Verify remote mounts. Similar to
.B \-r
except that only a notification message is printed for each bogus entry
found. The remote mount table is not changed.
.TP
.B \-A
Issues a command to the remote mountd declaring that ALL of its filesystems
have been unmounted. This should be used with caution, as it removes all
remote mount entries pertaining to the local system, whether or not any
filesystems are still mounted locally.
.TP
.B \-q
Be quiet.
Suppresses error messages due to timeouts and "Program not registered",
i.e., due to remote hosts not supporting RPC or not running mountd.
.TP
.BI \-h \ name
Pretend the local hostname is
.IR name .
This is useful after the local hostname has been changed and rmtab entries
using the old name remain on a remote machine.
Unfortunately, most mountd's won't be able to successfully handle removal
of such entries, so this option is useful in combination with
.B \-v
only.
.br
This option also saves time as comparisons of remotely recorded and local
hostnames by address are avoided.
.SH FILES
.PD 0
.TP 20
.B /etc/mtab
List of current mounts.
.TP
.B /etc/rmtab
Backup file for remote mount entries on NFS server.
.PD
.SH "SEE ALSO"
.\" .BR mtab (5),
.\" .BR rmtab (5),
.BR mountd (8),
.BR showmount (8)
.SH BUGS
No attempt is made to verify the information in
.B /etc/mtab
itself.
.PP
Since swap file mounts are not recorded in
.BR /etc/mtab ,
a heuristic specific to SunOS is used to determine whether such a mount
is actual (replacing the string "swap" with "root" and verifying the resulting
path).
.PP
Symbolic links on the server will cause the path in the remote entry to differ
from the one in
.BR /etc/mtab .
To catch those cases, a filesystem is also deemed mounted if its
.I local
mount point is identical to the remote entry.
I.e., on a SunOS diskless client,
.B server:/export/share/sunos.4.1.1
is actually
.BR /usr/share .
Since the local mount point is
.B /usr/share
as well this will be handled correctly.
.PP
There is no way to clear a stale entry in a remote mountd after the
local hostname (or whatever reverse name resolution returns for it)
has been changed. To take care of these cases,
the remote /etc/rmtab file has to be edited and mountd restarted.
.PP
The RPC timeouts for mountd calls can only be changed by recompiling.
The defaults are 2 seconds for client handle creation and 5 seconds for
RPC calls.