]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/amd/fixmount/fixmount.8
MFV r306669:
[FreeBSD/FreeBSD.git] / contrib / amd / fixmount / fixmount.8
1 .\"
2 .\" Copyright (c) 1997-2006 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.12.2.1 2006/01/02 18:48:25 ezk Exp $
42 .\" $FreeBSD$
43 .\"
44 .Dd February 26, 2016
45 .Dt FIXMOUNT 8
46 .Os
47 .Sh NAME
48 .Nm fixmount
49 .Nd fix remote mount entries
50 .Sh SYNOPSIS
51 .Nm
52 .Op Fl adervq
53 .Op Fl h Ar name
54 .Ar host ...
55 .Sh DESCRIPTION
56 .Bf -symbolic
57 This command is obsolete.
58 Users are advised to use
59 .Xr autofs 5
60 instead.
61 .Ef
62 .Pp
63 The
64 .Nm
65 utility
66 is a variant of
67 .Xr showmount 8
68 that can delete bogus mount entries in remote
69 .Xr mountd 8
70 daemons.
71 The actions specified by the options are performed for each
72 .Ar host
73 in turn.
74 .Sh OPTIONS
75 .Bl -tag -width indent
76 .It Fl a , d , e
77 These options work as in
78 .Xr showmount 8
79 except that only entries pertaining to the local host are printed.
80 .It Fl r
81 Removes those remote mount entries on
82 .Ar host
83 that do not correspond to current mounts, i.e., which are left-over
84 from a crash or are the result of improper mount protocol.
85 The actuality of mounts is verified using the entries in
86 .Pa /etc/mtab .
87 .It Fl v
88 Verify remote mounts.
89 Similar to
90 .Fl r
91 except that only a notification message is printed for each bogus entry
92 found.
93 The remote mount table is not changed.
94 .It Fl A
95 Issues a command to the remote mountd declaring that
96 .Em all
97 of its file systems have been unmounted.
98 This should be used with caution, as it removes all
99 remote mount entries pertaining to the local system, whether or not any
100 file systems are still mounted locally.
101 .It Fl q
102 Be quiet.
103 Suppresses error messages due to timeouts and
104 .Dq Li "Program not registered" ,
105 i.e., due to remote hosts not supporting RPC or not running
106 .Xr mountd 8 .
107 .It Fl h Ar name
108 Pretend the local hostname is
109 .Ar name .
110 This is useful after the local hostname has been changed and rmtab entries
111 using the old name remain on a remote machine.
112 Unfortunately, most mountd's will not be able to successfully handle removal
113 of such entries, so this option is useful in combination with
114 .Fl v
115 only.
116 .Pp
117 This option also saves time as comparisons of remotely recorded and local
118 hostnames by address are avoided.
119 .El
120 .Sh FILES
121 .Bl -tag -width ".Pa /etc/rmtab"
122 .It Pa /etc/mtab
123 List of current mounts.
124 .It Pa /etc/rmtab
125 Backup file for remote mount entries on
126 .Tn NFS
127 server.
128 .El
129 .Sh SEE ALSO
130 .Xr mtab 5 ,
131 .Xr rmtab 5 ,
132 .Xr mountd 8 ,
133 .Xr showmount 8
134 .Pp
135 .Dq am-utils
136 .Xr info 1
137 entry.
138 .Rs
139 .%A Erez Zadok
140 .%B "Linux NFS and Automounter Administration"
141 .%O ISBN 0-7821-2739-8
142 .%I Sybex
143 .%D 2001
144 .Re
145 .Pp
146 .Pa http://www.am-utils.org/
147 .Rs
148 .%T Amd \- The 4.4 BSD Automounter
149 .Re
150 .Sh HISTORY
151 The
152 .Nm
153 utility appeared in
154 .Fx 3.0 .
155 .Sh AUTHORS
156 .An Jan-Simon Pendry Aq jsp@doc.ic.ac.uk ,
157 Department of Computing, Imperial College, London, UK.
158 .Pp
159 .An Erez Zadok Aq ezk@cs.columbia.edu ,
160 Department of Computer Science, Columbia University, New York, USA.
161 .Pp
162 .An Other authors and contributors to
163 .Nm am-utils
164 are listed in the
165 .Pa AUTHORS
166 file distributed with
167 .Nm am-utils .
168 .Sh AUTHORS
169 .An Andreas Stolcke Aq stolcke@icsi.berkeley.edu
170 .Pp
171 .An Erez Zadok Aq ezk@cs.sunysb.edu ,
172 Computer Science Department, Stony Brook University, Stony Brook, New York, USA.
173 .Pp
174 Other authors and contributors to am-utils are listed in the
175 .Pa AUTHORS
176 file distributed with am-utils.
177 .Sh BUGS
178 No attempt is made to verify the information in
179 .Pa /etc/mtab
180 itself.
181 .Pp
182 Since swap file mounts are not recorded in
183 .Pa /etc/mtab ,
184 a heuristic specific to SunOS is used to determine whether such a mount
185 is actual (replacing the string
186 .Dq Li swap
187 with
188 .Dq Li root
189 and verifying the resulting path).
190 .Pp
191 Symbolic links on the server will cause the path in the remote entry to differ
192 from the one in
193 .Pa /etc/mtab .
194 To catch those cases, a file system is also deemed mounted if its
195 .Em local
196 mount point is identical to the remote entry.
197 I.e., on a SunOS diskless client,
198 .Pa server:/export/share/sunos.4.1.1
199 is actually
200 .Pa /usr/share .
201 Since the local mount point is
202 .Pa /usr/share
203 as well this will be handled correctly.
204 .Pp
205 There is no way to clear a stale entry in a remote
206 .Xr mountd 8
207 after the
208 local hostname (or whatever reverse name resolution returns for it)
209 has been changed.
210 To take care of these cases,
211 the remote
212 .Pa /etc/rmtab
213 file has to be edited and
214 .Xr mountd 8
215 restarted.
216 .Pp
217 The RPC timeouts for
218 .Xr mountd 8
219 calls can only be changed by recompiling.
220 The defaults are 2 seconds for client handle creation and 5 seconds for
221 RPC calls.