doc: remove unimplemented -showsuid and -showmounts from the salvageserver man page
[openafs.git] / doc / man-pages / pod8 / salvageserver.pod
1 =head1 NAME
2
3 salvageserver - Initializes the Salvageserver component of the dafs process
4
5 =head1 SYNOPSIS
6
7 =for html
8 <div class="synopsis">
9
10 B<salvageserver> [I<initcmd>] S<<< [B<-partition> <I<name of partition to salvage>>] >>>
11     S<<< [B<-volumeid> <I<volume id to salvage>>] >>> [B<-debug>] [B<-nowrite>]
12     [B<-inodes>] [B<-force>] [B<-oktozap>] [B<-rootinodes>]
13     [B<-salvagedirs>] [B<-blockreads>]
14     S<<< [B<-parallel> <I<# of max parallel partition salvaging>>] >>>
15     S<<< [B<-tmpdir> <I<name of dir to place tmp files>>] >>>
16     [B<-showlog>]
17     S<<< [B<-orphans> (ignore | remove | attach)] >>>
18     [B<-syslog>]
19     S<<< [B<-syslogfacility> <I<Syslog facility number to use>>] >>>
20     [B<-client>] [B<-help>]
21
22 =for html
23 </div>
24
25 =head1 DESCRIPTION
26
27 In its typical mode of operation, the B<salvageserver> is a daemon process 
28 responsible for salvaging volumes.  It is a component of the C<dafs> 
29 process type.  In the conventional configuration, its binary file is 
30 located in the F</usr/afs/bin> directory on a file server machine.
31
32 The Salvageserver daemon is responsible for scheduling and executing 
33 volume salvage operations on behalf of client processes.  The fileserver 
34 acts as the primary salvageserver client: any failed volume attach 
35 operation results in a salvageserver scheduling request.  The 
36 salvageserver also accepts periodic volume activity messages in order to 
37 update its salvage request priority queue.  Other clients of the 
38 salvageserver daemon include the B<salvsync-debug> utility, and the
39 salvageserver command itself by passing the B<-client> flag.
40
41 The salvage operations performed on vice partition data are nearly 
42 identical to those performed by the standalone Salvager command.  The 
43 key differences between the two commands are:
44
45 =over 4
46
47 =item *
48
49 The Salvageserver is a daemon process which runs concurrently with the 
50 fileserver.  In contrast, the Salvager is a stand-alone application which 
51 is invoked when the fileserver and volserver are not running.
52
53 =item *
54
55 The Salvageserver is incapable of performing whole partition salvage 
56 operations; it operates at volume group granularity.
57
58 =back
59
60 The Salvageserver normally creates new inodes as it repairs damage. If the
61 partition is so full that there is no room for new inodes, use the
62 B<-nowrite> argument to bringing undamaged volumes online without
63 attempting to salvage damaged volumes. Then use the B<vos move> command to
64 move one or more of the undamaged volumes to other partitions, freeing up
65 the space that the Salvageserver needs to create new inodes.
66
67 By default, multiple Salvageserver subprocesses run in parallel: one for each 
68 volume group.  By default, four concurrent salvage operations are 
69 permitted.  You may alter this default by providing a positive integer 
70 value for the B<-parallel> argument.  The maximum permitted value is 32 
71 concurrent salvageserver subprocesses.
72
73 By default, the salvageserver enables a heuristic which attempts to stop
74 disk head thrashing by concurrent salvageserver subprocesses.  Unfortunately,
75 this heuristic significantly degrades performance in many cases.  In at least 
76 the following environments, passing the C<all> string to the B<-parallel> 
77 argument is strongly encouraged:
78
79 =over 4
80
81 =item *
82
83 On NAMEI fileservers
84
85 =item *
86
87 When a vice partition is backed by multiple disks (e.g. RAID)
88
89 =item *
90
91 When a vice partition is backed by SAN-attached storage, LVM, or some other
92 form of storage virtualization which would cause unix device id numbers to
93 be unpredictable.
94
95 =back
96
97 The Salvageserver creates temporary files as it runs, by default writing them
98 to the partition it is salvaging. The number of files can be quite large,
99 and if the partition is too full to accommodate them, the Salvageserver
100 terminates without completing the salvage operation (it always removes the
101 temporary files before exiting). Other Salvageserver subprocesses running at
102 the same time continue until they finish salvaging all other partitions
103 where there is enough disk space for temporary files. To complete the
104 interrupted salvage, reissue the command against the appropriate
105 partitions, adding the B<-tmpdir> argument to redirect the temporary files
106 to a local disk directory that has enough space.
107
108 The B<-orphans> argument controls how the Salvageserver handles orphaned files
109 and directories that it finds on server partitions it is salvaging. An
110 I<orphaned> element is completely inaccessible because it is not
111 referenced by the vnode of any directory that can act as its parent (is
112 higher in the filespace). Orphaned objects occupy space on the server
113 partition, but do not count against the volume's quota.
114
115 This command does not use the syntax conventions of the AFS command
116 suites. Provide the command name and all option names in full.
117
118 =head1 OPTIONS
119
120 =over 4
121
122 =item [I<initcmd>]
123
124 Accommodates the command's use of the AFS command parser, and is optional.
125
126 =item B<-partition> <I<name of partition to salvage>>
127
128 Specifies the name of the partition to salvage. Specify the full partition
129 name using the form F</vicepI<x>> or F</vicepI<xx>>. Omit this argument to
130 salvage every partition on the file server machine.
131
132 =item B<-volumeid> <I<volume id to salvage>>
133
134 Specifies the volume ID of a specific read/write volume to salvage.  The
135 B<-partition> argument must be provided along with this one and specify
136 the volume's actual site.
137
138 =item B<-debug>
139
140 This flag should be considered deprecated.  Its primary purpose was to disable
141 forking and parallelization of the Salvager so that log messages were not
142 interleaved.  Due to the manner in which F</usr/afs/logs/SalsrvLog> is
143 written, log messages from subprocesses are never interleaved; the entire log
144 for a volume group salvage is appended to the master log as one atomic 
145 transaction.
146
147 =item B<-nowrite>
148
149 Brings all undamaged volumes online without attempting to salvage any
150 damaged volumes.
151
152 =item B<-inodes>
153
154 Records in the F</usr/afs/logs/SalsrvLog> file a list of all AFS inodes
155 that the Salvageserver modified.
156
157 =item B<-force>
158
159 Inspects all volumes for corruption, not just those that are marked as
160 having been active when a crash occurred.
161
162 =item B<-oktozap>
163
164 Removes a volume that is so damaged that even issuing the B<vos zap>
165 command with the B<-force> flag is ineffective. Combine it with the
166 B<-partition> and B<-volumeid> arguments to identify the volume to remove.
167 Using this flag will destroy data that cannot be read, so use only with
168 caution and when you're certain that nothing in that volume is still
169 needed.
170
171 =item B<-rootinodes>
172
173 Records in the F</usr/afs/logs/SalsrvLog> file a list of all AFS inodes
174 owned by the local superuser C<root>.
175
176 =item B<-salvagedirs>
177
178 Salvages entire directory structures, even if they do not appear to be
179 damaged. By default, the Salvageserver salvages a directory only if it is
180 flagged as corrupted.
181
182 =item B<-blockreads>
183
184 Forces the Salvageserver to read a partition one disk block (512 bytes) at a
185 time and to skip any blocks that are too badly damaged to be salvaged.
186 This allows it to salvage as many volumes as possible. By default, the
187 Salvageserver reads large disk blocks, which can cause it to exit prematurely
188 if it encounters disk errors. Use this flag if the partition to be
189 salvaged has disk errors.
190
191 =item B<-parallel> <I<# of max parallel partition salvaging>>
192
193 Specifies the maximum number of Salvageserver subprocesses to run in parallel.
194 Provide one of three values:
195
196 =over 4
197
198 =item *
199
200 An integer from the range C<1> to C<32>. A value of C<1> means that a
201 single Salvageserver subprocess salvages the volume groups sequentially.
202 The disk partition heuristic (see above) based upon unix device ids is 
203 enabled.
204
205 =item *
206
207 The disk partition heuristic (see above) based upon unix device ids is 
208 disabled.
209
210 =item *
211
212 The string C<all> followed immediately (with no intervening space) by an
213 integer from the range C<1> to C<32>, to run the specified number of
214 Salvageserver subprocesses in parallel on volume groups.  The disk partition 
215 heuristic (see above) based upon unix device ids is disabled.
216
217 =back
218
219 If this argument is omitted, up to four Salvageserver subprocesses run
220 in parallel.
221
222 =item B<-tmpdir> <I<name of dir to place tmp files>>
223
224 Names a local disk directory in which the Salvageserver places the temporary
225 files it creates during a salvage operation, instead of writing them to
226 the partition being salvaged (the default). If the Salvageserver cannot write
227 to the specified directory, it attempts to write to the partition being
228 salvaged.
229
230 =item B<-showlog>
231
232 Displays on the standard output stream all log data that is being written
233 to the F</usr/afs/logs/SalsrvLog> file.
234
235 =item B<-orphans> (ignore | remove | attach)
236
237 Controls how the Salvageserver handles orphaned files and directories.  Choose
238 one of the following three values:
239
240 =over 4
241
242 =item ignore
243
244 Leaves the orphaned objects on the disk, but prints a message to the
245 F</usr/afs/logs/SalsrvLog> file reporting how many orphans were found and
246 the approximate number of kilobytes they are consuming. This is the
247 default if the B<-orphans> argument is omitted.
248
249 =item remove
250
251 Removes the orphaned objects, and prints a message to the
252 F</usr/afs/logs/SalsrvLog> file reporting how many orphans were removed
253 and the approximate number of kilobytes they were consuming.
254
255 =item attach
256
257 Attaches the orphaned objects by creating a reference to them in the vnode
258 of the volume's root directory. Since each object's actual name is now
259 lost, the Salvageserver assigns each one a name of the following form:
260
261 =over 4
262
263 =item C<__ORPHANFILE__.I<index>> for files.
264
265 =item C<__ORPHANDIR__.I<index>> for directories.
266
267 =back
268
269 where I<index> is a two-digit number that uniquely identifies each
270 object. The orphans are charged against the volume's quota and appear in
271 the output of the B<ls> command issued against the volume's root
272 directory.
273
274 =back
275
276 =item B<-syslog>
277
278 Specifies that logging output should go to syslog instead of the log file.
279
280 =item B<-syslogfacility> <I<Syslog facility number to use>>
281
282 Specify to which facility log messages should be sent when B<-syslog> is
283 given.
284
285 =item B<-client>
286
287 Salvageserver runs in client Mode.  The requested volume on the requested
288 partition will be scheduled for salvaging by the Salvageserver daemon.
289
290 =item B<-logfile> <I<log file>>
291
292 Sets the file to use for server logging.  If logfile is not specified and
293 no other logging options are supplied, this will be F</usr/afs/logs/SalsrvLog>.
294 Note that this option is intended for debugging and testing purposes.
295 Changing the location of the log file from the command line may result
296 in undesirable interactions with tools such as B<bos>.
297
298 =item B<-help>
299
300 Prints the online help for this command. All other valid options are
301 ignored.
302
303 =back
304
305 =head1 EXAMPLES
306
307 The following command instructs the Salvageserver to schedule the salvage 
308 of the volume with volume ID 258347486 on F</vicepg> on the local machine.
309
310    % /usr/afs/bin/salvageserver -partition /vicepg -volumeid 258347486 -client
311
312 =head1 PRIVILEGE REQUIRED
313
314 To issue the command at the shell prompt, the issuer must be logged in as
315 the local superuser C<root>.
316
317 =head1 SEE ALSO
318
319 L<BosConfig(5)>,
320 L<SalvageLog(5)>,
321 L<salvager(8)>,
322 L<bos_create(8)>,
323 L<bos_getlog(8)>,
324 L<bos_salvage(8)>,
325 L<vos_move(1)>
326
327 =head1 COPYRIGHT
328
329 IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
330 Sine Nomine Associates 2008.  All Rights Reserved.
331
332 This documentation is covered by the IBM Public License Version 1.0.  It was
333 converted from HTML to POD by software written by Chas Williams and Russ
334 Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.  This document
335 was adapted from the Salvager POD documentation.