pam-afs-new-features-20010907
[openafs.git] / doc / html / AdminReference / auarf232.htm
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 4//EN">
2 <HTML><HEAD>
3 <TITLE>Administration Reference</TITLE>
4 <!-- Begin Header Records  ========================================== -->
5 <!-- /tmp/idwt3672/auarf000.scr converted by idb2h R4.2 (359) ID      -->
6 <!-- Workbench Version (AIX) on 3 Oct 2000 at 16:18:30                -->
7 <META HTTP-EQUIV="updated" CONTENT="Tue, 03 Oct 2000 16:18:29">
8 <META HTTP-EQUIV="review" CONTENT="Wed, 03 Oct 2001 16:18:29">
9 <META HTTP-EQUIV="expires" CONTENT="Thu, 03 Oct 2002 16:18:29">
10 </HEAD><BODY>
11 <!-- (C) IBM Corporation 2000. All Rights Reserved    --> 
12 <BODY bgcolor="ffffff"> 
13 <!-- End Header Records  ============================================ -->
14 <A NAME="Top_Of_Page"></A>
15 <H1>Administration Reference</H1>
16 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf231.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Bot_Of_Page"><IMG SRC="../bot.gif" BORDER="0" ALT="[Bottom of Topic]"></A> <A HREF="auarf233.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
17 <P>
18 <H2><A NAME="HDRSALVAGER" HREF="auarf002.htm#ToC_246">salvager</A></H2>
19 <A NAME="IDX5443"></A>
20 <A NAME="IDX5444"></A>
21 <A NAME="IDX5445"></A>
22 <A NAME="IDX5446"></A>
23 <P><STRONG>Purpose</STRONG>
24 <P>Initializes the Salvager component of the <B>fs</B> process
25 <P><STRONG>Synopsis</STRONG>
26 <PRE><B>salvager</B> [<B>initcmd</B>]  [<B>-partition</B> &lt;<VAR>Name&nbsp;of&nbsp;partition&nbsp;to&nbsp;salvage</VAR>>] 
27          [<B>-volumeid</B> &lt;<VAR>Volume&nbsp;Id&nbsp;to&nbsp;salvage</VAR>>]  [<B>-debug</B>]  
28          [<B>-nowrite</B>]  [<B>-inodes</B>]  [<B>-force</B>]  [<B>-oktozap</B>]  
29          [<B>-rootinodes</B>]  [<B>-salvagedirs</B>]  [<B>-blockreads</B>]  
30          [<B>-parallel</B> &lt;<VAR>#&nbsp;of&nbsp;max&nbsp;parallel&nbsp;partition&nbsp;salvaging</VAR>>]
31          [<B>-tmpdir</B> &lt;<VAR>Name&nbsp;of&nbsp;dir&nbsp;to&nbsp;place&nbsp;tmp&nbsp;files</VAR>>]  
32          [<B>-showlog</B>]  [<B>-showsuid</B>]  [<B>-showmounts</B>] 
33          [<B>-orphans</B> &lt;<B>ignore</B> | <B>remove</B> | <B>attach</B>>] [<B>-help</B>]
34 </PRE>
35 <P>This command does not use the syntax conventions of the AFS command
36 suites. Provide the command name and all option names in full.
37 <P><STRONG>Description</STRONG>
38 <P>The <B>salvager</B> command initializes the Salvager component of the
39 <B>fs</B> process. In the conventional configuration, its binary
40 file is located in the <B>/usr/afs/bin</B> directory on a file server
41 machine.
42 <P>The Salvager restores internal consistency to corrupted read/write volumes
43 on the local file server machine where possible. For read-only or
44 backup volumes, it inspects only the volume header:
45 <UL>
46 <P><LI>If the volume header is corrupted, the Salvager removes the volume
47 completely and records the removal in its log file,
48 <B>/usr/afs/logs/SalvageLog</B>. Issue the <B>vos release</B>
49 or <B>vos backup</B> command to create the read-only or backup volume
50 again.
51 <P><LI>If the volume header is intact, the Salvager skips the volume (does not
52 check for corruption in the contents). However, if the File Server
53 notices corruption as it initializes, it sometimes refuses to attach the
54 volume or bring it online. In this case, it is simplest to remove the
55 volume by issuing the <B>vos remove</B> or <B>vos zap</B>
56 command. Then issue the <B>vos release</B> or <B>vos backup</B>
57 command to create it again.
58 </UL>
59 <P>Unlike other server process initialization commands, the
60 <B>salvager</B> command is designed to be issued at the command shell
61 prompt, as well as being placed into a file server machine's
62 <B>/usr/afs/local/BosConfig</B> file with the <B>bos create</B>
63 command. It is also possible to invoke the Salvager remotely by issuing
64 the <B>bos salvage</B> command.
65 <P>Combine the command's options as indicated to salvage different
66 numbers of read/write volumes:
67 <UL>
68 <P><LI>To salvage all volumes on the file server machine, provide no
69 arguments. No volumes on the machine are accessible to Cache Managers
70 during the salvage, because the BOS Server stops the File Server and Volume
71 Server processes while the Salvager runs.
72 <P><LI>To salvage all of the volumes on one partition, provide the
73 <B>-partition</B> argument. As for a salvage of all volumes on the
74 machine, no volumes on the machine are accessible to Cache Managers during the
75 salvage operation.
76 <P><LI>To salvage only one volume, combine the <B>-partition</B> and
77 <B>-volumeid</B> arguments. Only that volume is inaccessible to
78 Cache Managers, because the BOS Server does not shutdown the File Server and
79 Volume Server processes.
80 </UL>
81 <P>The Salvager normally salvages only those read/write volumes that are
82 marked as having been active when a crash occurred. To have it salvage
83 all relevant read/write volumes, add the <B>-force</B> flag.
84 <P>The Salvager normally creates new inodes as it repairs damage. If
85 the partition is so full that there is no room for new inodes, use the
86 <B>-nowrite</B> argument to bringing undamaged volumes online without
87 attempting to salvage damaged volumes. Then use the <B>vos move</B>
88 command to move one or more of the undamaged volumes to other partitions,
89 freeing up the space that the Salvager needs to create new inodes.
90 <P>By default, multiple Salvager subprocesses run in parallel: one for
91 each partition up to four, and four subprocesses for four or more
92 partitions. To increase or decrease the number of subprocesses running
93 in parallel, provide a positive integer value for the <B>-parallel</B>
94 argument.
95 <P>If there is more than one server partition on a physical disk, the Salvager
96 by default salvages them serially to avoid the inefficiency of constantly
97 moving the disk head from one partition to another. However, this
98 strategy is often not ideal if the partitions are configured as logical
99 volumes that span multiple disks. To force the Salvager to salvage
100 logical volumes in parallel, provide the string <B>all</B> as the value
101 for the <B>-parallel</B> argument. Provide a positive integer to
102 specify the number of subprocesses to run in parallel (for example,
103 <B>-parallel 5all</B> for five subprocesses), or omit the integer to run
104 up to four subprocesses, depending on the number of logical volumes being
105 salvaged.
106 <P>The Salvager creates temporary files as it runs, by default writing them to
107 the partition it is salvaging. The number of files can be quite large,
108 and if the partition is too full to accommodate them, the Salvager terminates
109 without completing the salvage operation (it always removes the temporary
110 files before exiting). Other Salvager subprocesses running at the same
111 time continue until they finish salvaging all other partitions where there is
112 enough disk space for temporary files. To complete the interrupted
113 salvage, reissue the command against the appropriate partitions, adding the
114 <B>-tmpdir</B> argument to redirect the temporary files to a local disk
115 directory that has enough space.
116 <P>The <B>-orphans</B> argument controls how the Salvager handles orphaned
117 files and directories that it finds on server partitions it is
118 salvaging. An <I>orphaned</I> element is completely inaccessible
119 because it is not referenced by the vnode of any directory that can act as its
120 parent (is higher in the filespace). Orphaned objects occupy space on
121 the server partition, but do not count against the volume's quota.
122 <P>To generate a list of all mount points that reside in one or more volumes,
123 rather than actually salvaging them, include the <B>-showmounts</B>
124 flag.
125 <P><STRONG>Options</STRONG>
126 <DL>
127 <P><DT><B>initcmd
128 </B><DD>Accommodates the command's use of the AFS command parser, and is
129 optional.
130 <P><DT><B>-partition
131 </B><DD>Specifies the name of the partition to salvage. Specify the full
132 partition name using the form <B>/vicep</B><VAR>x</VAR> or
133 <B>/vicep</B><VAR>xx</VAR>. Omit this argument to salvage every
134 partition on the file server machine.
135 <P><DT><B>-volumeid
136 </B><DD>Specifies the volume ID of a specific read/write volume to salvage.
137 The <B>-partition</B> argument must be provided along with this one and
138 specify the volume's actual site.
139 <P><DT><B>-debug
140 </B><DD>Allows only one Salvager subprocess to run at a time, regardless of the
141 setting of the <B>-parallel</B> option. Include it when running the
142 Salvager in a debugger to make the trace easier to interpret.
143 <P><DT><B>-nowrite
144 </B><DD>Brings all undamaged volumes online without attempting to salvage any
145 damaged volumes.
146 <P><DT><B>-inodes
147 </B><DD>Records in the <B>/usr/afs/logs/SalvageLog</B> file a list of all AFS
148 inodes that the Salvager modified.
149 <P><DT><B>-force
150 </B><DD>Inspects all volumes for corruption, not just those that are marked as
151 having been active when a crash occurred.
152 <P><DT><B>-oktozap
153 </B><DD>Removes a volume that is so damaged that even issuing the <B>vos
154 zap</B> command with the <B>-force</B> flag is ineffective. Use
155 this argument only in consultation with AFS Development or Product
156 Support. Combine it with the <B>-partition</B> and
157 <B>-volumeid</B> arguments to identify the volume to remove.
158 <P><DT><B>-rootinodes
159 </B><DD>Records in the <B>/usr/afs/logs/SalvageLog</B> file a list of all AFS
160 inodes owned by the local superuser <B>root</B>.
161 <P><DT><B>-salvagedirs
162 </B><DD>Salvages entire directory structures, even if they do not appear to be
163 damaged. By default, the Salvager salvages a directory only if it is
164 flagged as corrupted.
165 <P><DT><B>-blockreads
166 </B><DD>Forces the Salvager to read a partition one disk block (512 bytes) at a
167 time and to skip any blocks that are too badly damaged to be salvaged.
168 This allows it to salvage as many volumes as possible. By default, the
169 Salvager reads large disk blocks, which can cause it to exit prematurely if it
170 encounters disk errors. Use this flag if the partition to be salvaged
171 has disk errors.
172 <P><DT><B>-parallel
173 </B><DD>Specifies the maximum number of Salvager subprocesses to run in
174 parallel. Provide one of three values:
175 <UL>
176 <P><LI>An integer from the range <B>1</B> to <B>32</B>. A value of
177 <B>1</B> means that a single Salvager process salvages the partitions
178 sequentially.
179 <P><LI>The string <B>all</B> to run up to four Salvager subprocesses in
180 parallel on partitions formatted as logical volumes that span multiple
181 physical disks. Use this value only with such logical volumes.
182 <P><LI>The string <B>all</B> followed immediately (with no intervening space)
183 by an integer from the range <B>1</B> to <B>32</B>, to run the
184 specified number of Salvager subprocesses in parallel on partitions formatted
185 as logical volumes. Use this value only with such logical
186 volumes.
187 </UL>
188 <P>The BOS Server never starts more Salvager subprocesses than there are
189 partitions, and always starts only one process to salvage a single
190 volume. If this argument is omitted, up to four Salvager subprocesses
191 run in parallel.
192 <P><DT><B>-tmpdir
193 </B><DD>Names a local disk directory in which the Salvager places the temporary
194 files it creates during a salvage operation, instead of writing them to the
195 partition being salvaged (the default). If the Salvager cannot write to
196 the specified directory, it attempts to write to the partition being
197 salvaged.
198 <P><DT><B>-showlog
199 </B><DD>Displays on the standard output stream all log data that is being written
200 to the <B>/usr/afs/logs/SalvageLog</B> file.
201 <P><DT><B>-showsuid
202 </B><DD>Displays a list of the pathnames for all files that have the setuid or
203 setgid mode bit set.
204 <P><DT><B>-showmounts
205 </B><DD>Records in the <B>/usr/afs/logs/SalvageLog</B> file all mount points
206 found in each volume. The Salvager does not repair corruption in the
207 volumes, if any exists.
208 <P><DT><B>-orphans
209 </B><DD>Controls how the Salvager handles orphaned files and directories.
210 Choose one of the following three values:
211 <DL>
212 <P><DT><B>ignore
213 </B><DD>Leaves the orphaned objects on the disk, but prints a message to the
214 <B>/usr/afs/logs/SalvageLog</B> file reporting how many orphans were found
215 and the approximate number of kilobytes they are consuming. This is the
216 default if the <B>-orphans</B> argument is omitted.
217 <P><DT><B>remove
218 </B><DD>Removes the orphaned objects, and prints a message to the
219 <B>/usr/afs/logs/SalvageLog</B> file reporting how many orphans were
220 removed and the approximate number of kilobytes they were consuming.
221 <P><DT><B>attach
222 </B><DD>Attaches the orphaned objects by creating a reference to them in the vnode
223 of the volume's root directory. Since each object's actual
224 name is now lost, the Salvager assigns each one a name of the following
225 form: 
226 <DL>
227 <DD><P><B>_ _ORPHANFILE_ _.</B><VAR>index</VAR> for files
228 <DD><P><B>_ _ORPHANDIR_ _.</B><VAR>index</VAR> for directories
229 </DL>
230 <P>
231 <P>where <VAR>index</VAR> is a two-digit number that uniquely identifies each
232 object. The orphans are charged against the volume's quota and
233 appear in the output of the <B>ls</B> command issued against the
234 volume's root directory.
235 </DL>
236 <P><DT><B>-help
237 </B><DD>Prints the online help for this command. All other valid options
238 are ignored.
239 </DL>
240 <P><STRONG>Examples</STRONG>
241 <P>The following command instructs the Salvager to attempt to salvage the
242 volume with volume ID 258347486 on <B>/vicepg</B> on the local
243 machine.
244 <PRE>   % <B>/usr/afs/bin/salvager -partition /vicepg -volumeid 258347486</B>
245    
246 </PRE>
247 <P><STRONG>Privilege Required</STRONG>
248 <P>To issue the command at the shell prompt, the issuer must be logged in as
249 the local superuser <B>root</B>.
250 <P><STRONG>Related Information</STRONG>
251 <P><A HREF="auarf016.htm#HDRBOSCONFIG">BosConfig</A>
252 <P><A HREF="auarf030.htm#HDRSALVAGELOG">SalvageLog</A>
253 <P><A HREF="auarf098.htm#HDRBOS_CREATE">bos create</A>
254 <P><A HREF="auarf102.htm#HDRBOS_GETLOG">bos getlog</A>
255 <P><A HREF="auarf114.htm#HDRBOS_SALVAGE">bos salvage</A>
256 <P><A HREF="auarf268.htm#HDRVOS_MOVE">vos move</A>
257 <P>
258 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf231.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Top_Of_Page"><IMG SRC="../top.gif" BORDER="0" ALT="[Top of Topic]"></A> <A HREF="auarf233.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
259 <!-- Begin Footer Records  ========================================== -->
260 <P><HR><B> 
261 <br>&#169; <A HREF="http://www.ibm.com/">IBM Corporation 2000.</A>  All Rights Reserved 
262 </B> 
263 <!-- End Footer Records  ============================================ -->
264 <A NAME="Bot_Of_Page"></A>
265 </BODY></HTML>