Merge from vendor branch LIBARCHIVE:
[dragonfly.git] / contrib / amd / fixmount / fixmount.8
1 .\"
2 .\" Copyright (c) 1997-1999 Erez Zadok
3 .\" Copyright (c) 1990 Jan-Simon Pendry
4 .\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
5 .\" Copyright (c) 1990 The Regents of the University of California.
6 .\" All rights reserved.
7 .\"
8 .\" This code is derived from software contributed to Berkeley by
9 .\" Jan-Simon Pendry at Imperial College, London.
10 .\"
11 .\" Redistribution and use in source and binary forms, with or without
12 .\" modification, are permitted provided that the following conditions
13 .\" are met:
14 .\" 1. Redistributions of source code must retain the above copyright
15 .\"    notice, this list of conditions and the following disclaimer.
16 .\" 2. Redistributions in binary form must reproduce the above copyright
17 .\"    notice, this list of conditions and the following disclaimer in the
18 .\"    documentation and/or other materials provided with the distribution.
19 .\" 3. All advertising materials mentioning features or use of this software
20 .\"    must display the following acknowledgment:
21 .\"      This product includes software developed by the University of
22 .\"      California, Berkeley and its contributors.
23 .\" 4. Neither the name of the University nor the names of its contributors
24 .\"    may be used to endorse or promote products derived from this software
25 .\"    without specific prior written permission.
26 .\"
27 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 .\" SUCH DAMAGE.
38 .\"
39 .\"     %W% (Berkeley) %G%
40 .\"
41 .\" $Id: fixmount.8,v 1.2 1999/01/10 21:54:26 ezk Exp $
42 .\" $FreeBSD: src/contrib/amd/fixmount/fixmount.8,v 1.5.2.2 2001/03/06 16:54:05 ru Exp $
43 .\" $DragonFly: src/contrib/amd/fixmount/fixmount.8,v 1.2 2003/06/17 04:23:57 dillon Exp $
44 .\"
45 .Dd February 26, 1993
46 .Dt FIXMOUNT 8
47 .Os
48 .Sh NAME
49 .Nm fixmount
50 .Nd fix remote mount entries
51 .Sh SYNOPSIS
52 .Nm
53 .Op Fl adervq
54 .Op Fl h Ar name
55 .Ar host
56 \&...
57 .Sh DESCRIPTION
58 .Nm
59 is a variant of 
60 .Xr showmount 8
61 that can delete bogus mount entries in remote
62 .Xr mountd 8
63 daemons.  The actions specified by the options are performed for each
64 .Ar host 
65 in turn.
66 .Sh OPTIONS
67 .Bl -tag -width Ds
68 .It Fl a Fl d Fl e
69 These options work as in
70 .Xr showmount 8
71 except that only entries pertaining to the local host are printed.
72 .It Fl r
73 Removes those remote mount entries on
74 .Ar host
75 that do not correspond to current mounts, i.e., which are left-over
76 from a crash or are the result of improper mount protocol.
77 The actuality of mounts is verified using the entries in
78 .Pa /etc/mtab .
79 .It Fl v
80 Verify remote mounts.  Similar to
81 .Fl r
82 except that only a notification message is printed for each bogus entry
83 found.  The remote mount table is not changed.
84 .It Fl A
85 Issues a command to the remote mountd declaring that
86 .Em all
87 of its filesystems have been unmounted.  This should be used with caution, as
88 it removes all remote mount entries pertaining to the local system, whether or
89 not any filesystems are still mounted locally.
90 .It Fl v
91 Be quiet.  Suppresses error messages due to timeouts and
92 .Dq Program not Registered ,
93 i.e., due to remote hosts not supporting RPC or not running
94 .Nm mountd .
95 .It Fl h Ar name
96 Pretend the local hostname is
97 .Ar name .
98 This is useful after the local hostname has been changed and rmtab entries
99 using the old name remain on a remote machine.
100 Unfortunately, most mountd's won't be able to successfully handle removal
101 of such entries, so this option is useful in combination with
102 .Fl v
103 only.
104 .Pp
105 This option also saves time as comparisons of remotely recorded and local
106 hostnames by address are avoided.
107 .El
108 .Sh FILES
109 .Bl -tag -width /axx
110 .It Pa /etc/mtab
111 List of current mounts.
112 .It Pa /etc/rmtab
113 Backup file for remote mount entries on
114 .Tn NFS
115 server.
116 .El
117 .Sh SEE ALSO
118 .Xr mtab 5 ,
119 .Xr rmtab 5 ,
120 .Xr mountd 8 ,
121 .Xr showmount 8
122 .Sh BUGS
123 No attempt is made to verify the information in
124 .Pa /etc/mtab
125 itself.
126 .Pp
127 Since swap file mounts are not recorded in
128 .Pa /etc/mtab ,
129 a heuristic specific to SunOS is used to determine whether such a mount
130 is actual (replacing the string 
131 .Ql swap 
132 with 
133 .Ql root
134 and verifying the resulting path).
135 .Pp
136 Symbolic links on the server will cause the path in the remote entry to differ
137 from the one in 
138 .Pa /etc/mtab .
139 To catch those cases, a filesystem is also deemed mounted if its
140 .Em local
141 mount point is identical to the remote entry.
142 I.e., on a SunOS diskless client,
143 .Pa server:/export/share/sunos.4.1.1
144 is actually
145 .Pa /usr/share .
146 Since the local mount point is
147 .Pa /usr/share
148 as well this will be handled correctly.
149 .Pp
150 There is no way to clear a stale entry in a remote 
151 .Nm mountd 
152 after the local hostname (or whatever reverse name resolution 
153 returns for it) has been changed.  To take care of these cases,
154 the remote
155 .Pa /etc/rmtab
156 file has to be edited and
157 .Nm mountd
158 restarted.
159 .Pp
160 The RPC timeouts for
161 .Nm mountd
162 calls can only be changed by recompiling. The defaults are 2 seconds 
163 for client handle creation and 5 seconds for RPC calls.
164 .Sh AUTHORS
165 .An Jan-Simon Pendry Aq jsp@doc.ic.ac.uk ,
166 Department of Computing, Imperial College, London, UK.
167 .Pp
168 .An Erez Zadok Aq ezk@cs.columbia.edu ,
169 Department of Computer Science, Columbia University, New York, USA.
170 .Pp
171 .An Other authors and contributors to 
172 .Nm am-utils
173 are listed in the
174 .Nm AUTHORS 
175 file distributed with
176 .Nm am-utils .
177 .Sh HISTORY
178 The
179 .Nm
180 utility appeared in
181 .Fx 3.0 .