1998-08-23 22:07:21 +00:00
|
|
|
.\"
|
2004-07-06 13:16:49 +00:00
|
|
|
.\" Copyright (c) 1997-2004 Erez Zadok
|
1998-08-23 22:07:21 +00:00
|
|
|
.\" 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%
|
|
|
|
.\"
|
2004-07-06 13:16:49 +00:00
|
|
|
.\" $Id: fixmount.8,v 1.3.2.6 2004/01/06 03:15:23 ezk Exp $
|
1999-09-15 05:45:17 +00:00
|
|
|
.\" $FreeBSD$
|
1998-08-23 22:07:21 +00:00
|
|
|
.\"
|
1998-09-12 04:04:59 +00:00
|
|
|
.Dd February 26, 1993
|
|
|
|
.Dt FIXMOUNT 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm fixmount
|
|
|
|
.Nd fix remote mount entries
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Op Fl adervq
|
|
|
|
.Op Fl h Ar name
|
|
|
|
.Ar host
|
1998-08-23 22:07:21 +00:00
|
|
|
\&...
|
1998-09-12 04:04:59 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2005-06-16 20:21:03 +00:00
|
|
|
is a variant of
|
1998-09-12 04:04:59 +00:00
|
|
|
.Xr showmount 8
|
1998-08-23 22:07:21 +00:00
|
|
|
that can delete bogus mount entries in remote
|
1998-09-12 04:04:59 +00:00
|
|
|
.Xr mountd 8
|
2005-06-16 20:21:03 +00:00
|
|
|
daemons.
|
|
|
|
The actions specified by the options are performed for each
|
|
|
|
.Ar host
|
1998-08-23 22:07:21 +00:00
|
|
|
in turn.
|
1998-09-12 04:04:59 +00:00
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Fl a Fl d Fl e
|
1998-08-23 22:07:21 +00:00
|
|
|
These options work as in
|
1998-09-12 04:04:59 +00:00
|
|
|
.Xr showmount 8
|
1998-08-23 22:07:21 +00:00
|
|
|
except that only entries pertaining to the local host are printed.
|
1998-09-12 04:04:59 +00:00
|
|
|
.It Fl r
|
1998-08-23 22:07:21 +00:00
|
|
|
Removes those remote mount entries on
|
1998-09-12 04:04:59 +00:00
|
|
|
.Ar host
|
1998-08-23 22:07:21 +00:00
|
|
|
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
|
1998-09-12 04:04:59 +00:00
|
|
|
.Pa /etc/mtab .
|
|
|
|
.It Fl v
|
2005-06-16 20:21:03 +00:00
|
|
|
Verify remote mounts.
|
|
|
|
Similar to
|
1998-09-12 04:04:59 +00:00
|
|
|
.Fl r
|
1998-08-23 22:07:21 +00:00
|
|
|
except that only a notification message is printed for each bogus entry
|
2005-06-16 20:21:03 +00:00
|
|
|
found.
|
|
|
|
The remote mount table is not changed.
|
1998-09-12 04:04:59 +00:00
|
|
|
.It Fl A
|
|
|
|
Issues a command to the remote mountd declaring that
|
|
|
|
.Em all
|
2005-06-16 20:21:03 +00:00
|
|
|
of its file systems have been unmounted.
|
|
|
|
This should be used with caution, as
|
1998-09-12 04:04:59 +00:00
|
|
|
it removes all remote mount entries pertaining to the local system, whether or
|
2002-12-12 17:26:04 +00:00
|
|
|
not any file systems are still mounted locally.
|
1998-09-12 04:04:59 +00:00
|
|
|
.It Fl v
|
2005-06-16 20:21:03 +00:00
|
|
|
Be quiet.
|
|
|
|
Suppresses error messages due to timeouts and
|
1998-09-12 04:04:59 +00:00
|
|
|
.Dq Program not Registered ,
|
|
|
|
i.e., due to remote hosts not supporting RPC or not running
|
|
|
|
.Nm mountd .
|
|
|
|
.It Fl h Ar name
|
1998-08-23 22:07:21 +00:00
|
|
|
Pretend the local hostname is
|
1998-09-12 04:04:59 +00:00
|
|
|
.Ar name .
|
1998-08-23 22:07:21 +00:00
|
|
|
This is useful after the local hostname has been changed and rmtab entries
|
|
|
|
using the old name remain on a remote machine.
|
2005-02-13 22:25:33 +00:00
|
|
|
Unfortunately, most mountd's will not be able to successfully handle removal
|
1998-08-23 22:07:21 +00:00
|
|
|
of such entries, so this option is useful in combination with
|
1998-09-12 04:04:59 +00:00
|
|
|
.Fl v
|
1998-08-23 22:07:21 +00:00
|
|
|
only.
|
1998-09-12 04:04:59 +00:00
|
|
|
.Pp
|
1998-08-23 22:07:21 +00:00
|
|
|
This option also saves time as comparisons of remotely recorded and local
|
|
|
|
hostnames by address are avoided.
|
2001-01-10 14:01:39 +00:00
|
|
|
.El
|
1998-09-12 04:04:59 +00:00
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width /axx
|
|
|
|
.It Pa /etc/mtab
|
1998-08-23 22:07:21 +00:00
|
|
|
List of current mounts.
|
1998-09-12 04:04:59 +00:00
|
|
|
.It Pa /etc/rmtab
|
|
|
|
Backup file for remote mount entries on
|
|
|
|
.Tn NFS
|
|
|
|
server.
|
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr mtab 5 ,
|
|
|
|
.Xr rmtab 5 ,
|
|
|
|
.Xr mountd 8 ,
|
2001-02-01 17:12:45 +00:00
|
|
|
.Xr showmount 8
|
2005-06-16 20:21:03 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility appeared in
|
|
|
|
.Fx 3.0 .
|
|
|
|
.Sh AUTHORS
|
|
|
|
.An Jan-Simon Pendry Aq jsp@doc.ic.ac.uk ,
|
|
|
|
Department of Computing, Imperial College, London, UK.
|
|
|
|
.Pp
|
|
|
|
.An Erez Zadok Aq ezk@cs.columbia.edu ,
|
|
|
|
Department of Computer Science, Columbia University, New York, USA.
|
|
|
|
.Pp
|
|
|
|
.An Other authors and contributors to
|
|
|
|
.Nm am-utils
|
|
|
|
are listed in the
|
|
|
|
.Nm AUTHORS
|
|
|
|
file distributed with
|
|
|
|
.Nm am-utils .
|
1998-09-12 04:04:59 +00:00
|
|
|
.Sh BUGS
|
1998-08-23 22:07:21 +00:00
|
|
|
No attempt is made to verify the information in
|
1998-09-12 04:04:59 +00:00
|
|
|
.Pa /etc/mtab
|
1998-08-23 22:07:21 +00:00
|
|
|
itself.
|
1998-09-12 04:04:59 +00:00
|
|
|
.Pp
|
1998-08-23 22:07:21 +00:00
|
|
|
Since swap file mounts are not recorded in
|
1998-09-12 04:04:59 +00:00
|
|
|
.Pa /etc/mtab ,
|
1998-08-23 22:07:21 +00:00
|
|
|
a heuristic specific to SunOS is used to determine whether such a mount
|
2005-06-16 20:21:03 +00:00
|
|
|
is actual (replacing the string
|
|
|
|
.Ql swap
|
|
|
|
with
|
1998-09-12 04:04:59 +00:00
|
|
|
.Ql root
|
|
|
|
and verifying the resulting path).
|
|
|
|
.Pp
|
1998-08-23 22:07:21 +00:00
|
|
|
Symbolic links on the server will cause the path in the remote entry to differ
|
2005-06-16 20:21:03 +00:00
|
|
|
from the one in
|
1998-09-12 04:04:59 +00:00
|
|
|
.Pa /etc/mtab .
|
2002-12-12 17:26:04 +00:00
|
|
|
To catch those cases, a file system is also deemed mounted if its
|
1998-09-12 04:04:59 +00:00
|
|
|
.Em local
|
1998-08-23 22:07:21 +00:00
|
|
|
mount point is identical to the remote entry.
|
|
|
|
I.e., on a SunOS diskless client,
|
2001-02-01 17:12:45 +00:00
|
|
|
.Pa server:/export/share/sunos.4.1.1
|
1998-08-23 22:07:21 +00:00
|
|
|
is actually
|
1998-09-12 04:04:59 +00:00
|
|
|
.Pa /usr/share .
|
1998-08-23 22:07:21 +00:00
|
|
|
Since the local mount point is
|
1998-09-12 04:04:59 +00:00
|
|
|
.Pa /usr/share
|
1998-08-23 22:07:21 +00:00
|
|
|
as well this will be handled correctly.
|
1998-09-12 04:04:59 +00:00
|
|
|
.Pp
|
2005-06-16 20:21:03 +00:00
|
|
|
There is no way to clear a stale entry in a remote
|
|
|
|
.Nm mountd
|
|
|
|
after the local hostname (or whatever reverse name resolution
|
|
|
|
returns for it) has been changed.
|
|
|
|
To take care of these cases,
|
1998-09-12 04:04:59 +00:00
|
|
|
the remote
|
|
|
|
.Pa /etc/rmtab
|
|
|
|
file has to be edited and
|
1998-11-30 23:21:24 +00:00
|
|
|
.Nm mountd
|
1998-09-12 04:04:59 +00:00
|
|
|
restarted.
|
|
|
|
.Pp
|
|
|
|
The RPC timeouts for
|
|
|
|
.Nm mountd
|
2005-06-16 20:21:03 +00:00
|
|
|
calls can only be changed by recompiling.
|
|
|
|
The defaults are 2 seconds
|
1998-09-12 04:04:59 +00:00
|
|
|
for client handle creation and 5 seconds for RPC calls.
|