summaryrefslogtreecommitdiffstats
path: root/contrib/amd/fixmount/fixmount.8
blob: 07e34d17ef38e34a329de6c3ef1a362893916d50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
.\"
.\" Copyright (c) 1997-2006 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.12.2.1 2006/01/02 18:48:25 ezk Exp $
.\" $FreeBSD$
.\"
.Dd January 2, 2006
.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 ...
.Sh DESCRIPTION
The
.Nm
utility
is a variant of
.Xr showmount 8
that can delete bogus mount entries in remote
.Xr mountd 8
daemons.
The actions specified by the options are performed for each
.Ar host
in turn.
.Sh OPTIONS
.Bl -tag -width indent
.It Fl a , d , e
These options work as in
.Xr showmount 8
except that only entries pertaining to the local host are printed.
.It Fl r
Removes those remote mount entries on
.Ar 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
.Pa /etc/mtab .
.It Fl v
Verify remote mounts.
Similar to
.Fl r
except that only a notification message is printed for each bogus entry
found.
The remote mount table is not changed.
.It Fl A
Issues a command to the remote mountd declaring that
.Em all
of its file systems 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
file systems are still mounted locally.
.It Fl q
Be quiet.
Suppresses error messages due to timeouts and
.Dq Li "Program not registered" ,
i.e., due to remote hosts not supporting RPC or not running
.Xr mountd 8 .
.It Fl h Ar name
Pretend the local hostname is
.Ar 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 will not be able to successfully handle removal
of such entries, so this option is useful in combination with
.Fl v
only.
.Pp
This option also saves time as comparisons of remotely recorded and local
hostnames by address are avoided.
.El
.Sh FILES
.Bl -tag -width ".Pa /etc/rmtab"
.It Pa /etc/mtab
List of current mounts.
.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 ,
.Xr showmount 8
.Pp
.Dq am-utils
.Xr info 1
entry.
.Rs
.%A Erez Zadok
.%B "Linux NFS and Automounter Administration"
.%O ISBN 0-7821-2739-8
.%I Sybex
.%D 2001
.Re
.Pp
.Pa http://www.am-utils.org/
.Rs
.%T Amd \- The 4.4 BSD Automounter
.Re
.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
.Pa AUTHORS
file distributed with
.Nm am-utils .
.Sh AUTHORS
.An Andreas Stolcke Aq stolcke@icsi.berkeley.edu
.Pp
.An Erez Zadok Aq ezk@cs.sunysb.edu ,
Computer Science Department, Stony Brook University, Stony Brook, New York, USA.
.Pp
Other authors and contributors to am-utils are listed in the
.Pa AUTHORS
file distributed with am-utils.
.Sh BUGS
No attempt is made to verify the information in
.Pa /etc/mtab
itself.
.Pp
Since swap file mounts are not recorded in
.Pa /etc/mtab ,
a heuristic specific to SunOS is used to determine whether such a mount
is actual (replacing the string
.Dq Li swap
with
.Dq Li 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
.Pa /etc/mtab .
To catch those cases, a file system is also deemed mounted if its
.Em local
mount point is identical to the remote entry.
I.e., on a SunOS diskless client,
.Pa server:/export/share/sunos.4.1.1
is actually
.Pa /usr/share .
Since the local mount point is
.Pa /usr/share
as well this will be handled correctly.
.Pp
There is no way to clear a stale entry in a remote
.Xr mountd 8
after the
local hostname (or whatever reverse name resolution returns for it)
has been changed.
To take care of these cases,
the remote
.Pa /etc/rmtab
file has to be edited and
.Xr mountd 8
restarted.
.Pp
The RPC timeouts for
.Xr mountd 8
calls can only be changed by recompiling.
The defaults are 2 seconds for client handle creation and 5 seconds for
RPC calls.
OpenPOWER on IntegriCloud