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