3 salvageserver - Initializes the Salvageserver component of the dafs process
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 S<<< [B<-orphans> (ignore | remove | attach)] >>>
18 S<<< [B<-syslogfacility> <I<Syslog facility number to use>>] >>>
19 [B<-client>] [B<-help>]
26 In its typical mode of operation, the B<salvageserver> is a daemon process
27 responsible for salvaging volumes. It is a component of the C<dafs>
28 process type. In the conventional configuration, its binary file is
29 located in the F</usr/afs/bin> directory on a file server machine.
31 The Salvageserver daemon is responsible for scheduling and executing
32 volume salvage operations on behalf of client processes. The fileserver
33 acts as the primary salvageserver client: any failed volume attach
34 operation results in a salvageserver scheduling request. The
35 salvageserver also accepts periodic volume activity messages in order to
36 update its salvage request priority queue. Other clients of the
37 salvageserver daemon include the B<salvsync-debug> utility, and the
38 salvageserver command itself by passing the B<-client> flag.
40 The salvage operations performed on vice partition data are nearly
41 identical to those performed by the standalone Salvager command. The
42 key differences between the two commands are:
48 The Salvageserver is a daemon process which runs concurrently with the
49 fileserver. In contrast, the Salvager is a stand-alone application which
50 is invoked when the fileserver and volserver are not running.
54 The Salvageserver is incapable of performing whole partition salvage
55 operations; it operates at volume group granularity.
59 The Salvageserver normally creates new inodes as it repairs damage. If the
60 partition is so full that there is no room for new inodes, use the
61 B<-nowrite> argument to bringing undamaged volumes online without
62 attempting to salvage damaged volumes. Then use the B<vos move> command to
63 move one or more of the undamaged volumes to other partitions, freeing up
64 the space that the Salvageserver needs to create new inodes.
66 By default, multiple Salvageserver subprocesses run in parallel: one for each
67 volume group. By default, four concurrent salvage operations are
68 permitted. You may alter this default by providing a positive integer
69 value for the B<-parallel> argument. The maximum permitted value is 32
70 concurrent salvageserver subprocesses.
72 By default, the salvageserver enables a heuristic which attempts to stop
73 disk head thrashing by concurrent salvageserver subprocesses. Unfortunately,
74 this heuristic significantly degrades performance in many cases. In at least
75 the following environments, passing the C<all> string to the B<-parallel>
76 argument is strongly encouraged:
86 When a vice partition is backed by multiple disks (e.g. RAID)
90 When a vice partition is backed by SAN-attached storage, LVM, or some other
91 form of storage virtualization which would cause unix device id numbers to
96 The Salvageserver creates temporary files as it runs, by default writing them
97 to the partition it is salvaging. The number of files can be quite large,
98 and if the partition is too full to accommodate them, the Salvageserver
99 terminates without completing the salvage operation (it always removes the
100 temporary files before exiting). Other Salvageserver subprocesses running at
101 the same time continue until they finish salvaging all other partitions
102 where there is enough disk space for temporary files. To complete the
103 interrupted salvage, reissue the command against the appropriate
104 partitions, adding the B<-tmpdir> argument to redirect the temporary files
105 to a local disk directory that has enough space.
107 The B<-orphans> argument controls how the Salvageserver handles orphaned files
108 and directories that it finds on server partitions it is salvaging. An
109 I<orphaned> element is completely inaccessible because it is not
110 referenced by the vnode of any directory that can act as its parent (is
111 higher in the filespace). Orphaned objects occupy space on the server
112 partition, but do not count against the volume's quota.
114 This command does not use the syntax conventions of the AFS command
115 suites. Provide the command name and all option names in full.
123 Accommodates the command's use of the AFS command parser, and is optional.
125 =item B<-partition> <I<name of partition to salvage>>
127 Specifies the name of the partition to salvage. Specify the full partition
128 name using the form F</vicepI<x>> or F</vicepI<xx>>. Omit this argument to
129 salvage every partition on the file server machine.
131 =item B<-volumeid> <I<volume id to salvage>>
133 Specifies the volume ID of a specific read/write volume to salvage. The
134 B<-partition> argument must be provided along with this one and specify
135 the volume's actual site.
139 This flag should be considered deprecated. Its primary purpose was to disable
140 forking and parallelization of the Salvager so that log messages were not
141 interleaved. Due to the manner in which F</usr/afs/logs/SalsrvLog> is
142 written, log messages from subprocesses are never interleaved; the entire log
143 for a volume group salvage is appended to the master log as one atomic
148 Brings all undamaged volumes online without attempting to salvage any
153 Records in the F</usr/afs/logs/SalsrvLog> file a list of all AFS inodes
154 that the Salvageserver modified.
158 Inspects all volumes for corruption, not just those that are marked as
159 having been active when a crash occurred.
163 Removes a volume that is so damaged that even issuing the B<vos zap>
164 command with the B<-force> flag is ineffective. Combine it with the
165 B<-partition> and B<-volumeid> arguments to identify the volume to remove.
166 Using this flag will destroy data that cannot be read, so use only with
167 caution and when you're certain that nothing in that volume is still
172 Records in the F</usr/afs/logs/SalsrvLog> file a list of all AFS inodes
173 owned by the local superuser C<root>.
175 =item B<-salvagedirs>
177 Salvages entire directory structures, even if they do not appear to be
178 damaged. By default, the Salvageserver salvages a directory only if it is
179 flagged as corrupted.
183 Forces the Salvageserver to read a partition one disk block (512 bytes) at a
184 time and to skip any blocks that are too badly damaged to be salvaged.
185 This allows it to salvage as many volumes as possible. By default, the
186 Salvageserver reads large disk blocks, which can cause it to exit prematurely
187 if it encounters disk errors. Use this flag if the partition to be
188 salvaged has disk errors.
190 =item B<-parallel> <I<# of max parallel partition salvaging>>
192 Specifies the maximum number of Salvageserver subprocesses to run in parallel.
193 Provide one of three values:
199 An integer from the range C<1> to C<32>. A value of C<1> means that a
200 single Salvageserver subprocess salvages the volume groups sequentially.
201 The disk partition heuristic (see above) based upon unix device ids is
206 The disk partition heuristic (see above) based upon unix device ids is
211 The string C<all> followed immediately (with no intervening space) by an
212 integer from the range C<1> to C<32>, to run the specified number of
213 Salvageserver subprocesses in parallel on volume groups. The disk partition
214 heuristic (see above) based upon unix device ids is disabled.
218 If this argument is omitted, up to four Salvageserver subprocesses run
221 =item B<-tmpdir> <I<name of dir to place tmp files>>
223 Names a local disk directory in which the Salvageserver places the temporary
224 files it creates during a salvage operation, instead of writing them to
225 the partition being salvaged (the default). If the Salvageserver cannot write
226 to the specified directory, it attempts to write to the partition being
229 =item B<-orphans> (ignore | remove | attach)
231 Controls how the Salvageserver handles orphaned files and directories. Choose
232 one of the following three values:
238 Leaves the orphaned objects on the disk, but prints a message to the
239 F</usr/afs/logs/SalsrvLog> file reporting how many orphans were found and
240 the approximate number of kilobytes they are consuming. This is the
241 default if the B<-orphans> argument is omitted.
245 Removes the orphaned objects, and prints a message to the
246 F</usr/afs/logs/SalsrvLog> file reporting how many orphans were removed
247 and the approximate number of kilobytes they were consuming.
251 Attaches the orphaned objects by creating a reference to them in the vnode
252 of the volume's root directory. Since each object's actual name is now
253 lost, the Salvageserver assigns each one a name of the following form:
257 =item C<__ORPHANFILE__.I<index>> for files.
259 =item C<__ORPHANDIR__.I<index>> for directories.
263 where I<index> is a two-digit number that uniquely identifies each
264 object. The orphans are charged against the volume's quota and appear in
265 the output of the B<ls> command issued against the volume's root
272 Specifies that logging output should go to syslog instead of the log file.
274 =item B<-syslogfacility> <I<Syslog facility number to use>>
276 Specify to which facility log messages should be sent when B<-syslog> is
281 Salvageserver runs in client Mode. The requested volume on the requested
282 partition will be scheduled for salvaging by the Salvageserver daemon.
284 =item B<-logfile> <I<log file>>
286 Sets the file to use for server logging. If logfile is not specified and
287 no other logging options are supplied, this will be F</usr/afs/logs/SalsrvLog>.
288 Note that this option is intended for debugging and testing purposes.
289 Changing the location of the log file from the command line may result
290 in undesirable interactions with tools such as B<bos>.
294 Prints the online help for this command. All other valid options are
301 The following command instructs the Salvageserver to schedule the salvage
302 of the volume with volume ID 258347486 on F</vicepg> on the local machine.
304 % /usr/afs/bin/salvageserver -partition /vicepg -volumeid 258347486 -client
306 =head1 PRIVILEGE REQUIRED
308 To issue the command at the shell prompt, the issuer must be logged in as
309 the local superuser C<root>.
323 IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
324 Sine Nomine Associates 2008. All Rights Reserved.
326 This documentation is covered by the IBM Public License Version 1.0. It was
327 converted from HTML to POD by software written by Chas Williams and Russ
328 Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. This document
329 was adapted from the Salvager POD documentation.