kaauxdb-fix-silly-comment-substitution-20010711
[openafs.git] / doc / html / AdminReference / auarf114.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="auarf113.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="auarf115.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="HDRBOS_SALVAGE" HREF="auarf002.htm#ToC_128">bos salvage</A></H2>
19 <A NAME="IDX4609"></A>
20 <A NAME="IDX4610"></A>
21 <A NAME="IDX4611"></A>
22 <A NAME="IDX4612"></A>
23 <A NAME="IDX4613"></A>
24 <A NAME="IDX4614"></A>
25 <A NAME="IDX4615"></A>
26 <A NAME="IDX4616"></A>
27 <P><STRONG>Purpose</STRONG>
28 <P>Restores internal consistency to a file system or volume
29 <P><STRONG>Synopsis</STRONG>
30 <PRE><B>bos salvage -server</B> &lt;<VAR>machine&nbsp;name</VAR>>  [<B>-partition</B> &lt;<VAR>salvage&nbsp;partition</VAR>>]
31             [<B>-volume</B> &lt;<VAR>salvage&nbsp;volume&nbsp;number&nbsp;or&nbsp;volume&nbsp;name</VAR>>]
32             [<B>-file</B> &lt;<VAR>salvage&nbsp;log&nbsp;output&nbsp;file</VAR>>]  [<B>-all</B>]  [<B>-showlog</B>] 
33             [<B>-parallel</B> &lt;<VAR>#&nbsp;of&nbsp;max&nbsp;parallel&nbsp;partition&nbsp;salvaging</VAR>>]  
34             [<B>-tmpdir</B> &lt;<VAR>directory&nbsp;to&nbsp;place&nbsp;tmp&nbsp;files</VAR>>] 
35             [<B>-orphans</B> &lt;<B>ignore</B> | <B>remove</B> | <B>attach</B>>] 
36             [<B>-cell</B> &lt;<VAR>cell&nbsp;name</VAR>>]
37             [<B>-noauth</B>]  [<B>-localauth</B>]  [<B>-help</B>]
38    
39 <B>bos sa -se</B> &lt;<VAR>machine&nbsp;name</VAR>>  [<B>-part</B> &lt;<VAR>salvage&nbsp;partition</VAR>>]
40        [<B>-v</B> &lt;<VAR>salvage&nbsp;volume&nbsp;number&nbsp;or&nbsp;volume&nbsp;name</VAR>>]  
41        [<B>-f</B> &lt;<VAR>salvage&nbsp;log&nbsp;output&nbsp;file</VAR>>]  [<B>-a</B>]  [<B>-sh</B>] 
42        [<B>-para</B> &lt;<VAR>#&nbsp;of&nbsp;max&nbsp;parallel&nbsp;partition&nbsp;salvaging</VAR>>]  
43        [<B>-t</B> &lt;<VAR>directory&nbsp;to&nbsp;place&nbsp;tmp&nbsp;files</VAR>>]   
44        [<B>-o</B> &lt;<B>ignore</B> | <B>remove</B> | <B>attach</B>>] 
45        [<B>-c</B> &lt;<VAR>cell&nbsp;name</VAR>>]  [<B>-n</B>]  [<B>-l</B>]  [<B>-h</B>]
46 </PRE>
47 <P><STRONG>Description</STRONG>
48 <P>The <B>bos salvage</B> command salvages (restores internal consistency
49 to) one or more volumes on the file server machine named by the
50 <B>-server</B> argument. When processing one or more partitions,
51 the command restores consistency to corrupted read/write volumes where
52 possible. For read-only or backup volumes, it inspects only the volume
53 header:
54 <UL>
55 <P><LI>If the volume header is corrupted, the Salvager removes the volume
56 completely and records the removal in its log file,
57 <B>/usr/afs/logs/SalvageLog</B>. Issue the <B>vos release</B>
58 or <B>vos backup</B> command to create the read-only or backup volume
59 again.
60 <P><LI>If the volume header is intact, the Salvager skips the volume (does not
61 check for corruption in the contents). However, if the File Server
62 notices corruption as it initializes, it sometimes refuses to attach the
63 volume or bring it online. In this case, it is simplest to remove the
64 volume by issuing the <B>vos remove</B> or <B>vos zap</B>
65 command. Then issue the <B>vos release</B> or <B>vos backup</B>
66 command to create it again.
67 </UL>
68 <P>Use the indicated arguments to salvage a specific number of volumes:
69 <UL>
70 <P><LI>To process all volumes on a file server machine, provide the
71 <B>-server</B> argument and the <B>-all</B> flag. No volumes on
72 the machine are accessible to Cache Managers during the salvage operation,
73 because the BOS Server stops the File Server and Volume Server processes while
74 the Salvager runs. The BOS Server automatically restarts them when the
75 operation completes.
76 <P><LI>To process all volumes on one partition, provide the <B>-server</B>
77 and <B>-partition</B> arguments. As for a salvage of the entire
78 machine, no volumes on the machine are accessible to Cache Managers during the
79 salvage operation. The BOS Server automatically restarts the File
80 Server and Volume Server when the operation completes.
81 <P><LI>To salvage only one read/write volume, combine the <B>-server</B>,
82 <B>-partition</B>, and <B>-volume</B> arguments. Only that
83 volume is inaccessible to Cache Managers, because the BOS Server does not
84 shutdown the File Server and Volume Server processes during the salvage of a
85 single volume. Do not name a read-only or backup volume with the
86 <B>-volume</B> argument. Instead, remove the volume, using the
87 <B>vos remove</B> or <B>vos zap</B> command. Then create a new
88 copy of the volume with the <B>vos release</B> or <B>vos backup</B>
89 command.
90 </UL>
91 <P>During the salvage of an entire machine or partition, the <B>bos
92 status</B> command reports the <B>fs</B> process's auxiliary status
93 as <TT>Salvaging file system</TT>.
94 <P>The Salvager always writes a trace to the
95 <B>/usr/afs/logs/SalvageLog</B> file on the file server machine where it
96 runs. To record the trace in another file as well (either in AFS or on
97 the local disk of the machine where the <B>bos salvage</B> command is
98 issued), name the file with the <B>-file</B> argument. To display
99 the trace on the standard output stream as it is written to the
100 <B>/usr/afs/logs/SalvageLog</B> file, include the <B>-showlog</B>
101 flag.
102 <P>By default, multiple Salvager subprocesses run in parallel: one for
103 each partition up to four, and four subprocesses for four or more
104 partitions. To increase or decrease the number of subprocesses running
105 in parallel, provide a positive integer value for the <B>-parallel</B>
106 argument.
107 <P>If there is more than one server partition on a physical disk, the Salvager
108 by default salvages them serially to avoid the inefficiency of constantly
109 moving the disk head from one partition to another. However, this
110 strategy is often not ideal if the partitions are configured as logical
111 volumes that span multiple disks. To force the Salvager to salvage
112 logical volumes in parallel, provide the string <B>all</B> as the value
113 for the <B>-parallel</B> argument. Provide a positive integer to
114 specify the number of subprocesses to run in parallel (for example,
115 <B>-parallel 5all</B> for five subprocesses), or omit the integer to run
116 up to four subprocesses, depending on the number of logical volumes being
117 salvaged.
118 <P>The Salvager creates temporary files as it runs, by default writing them to
119 the partition it is salvaging. The number of files can be quite large,
120 and if the partition is too full to accommodate them, the Salvager terminates
121 without completing the salvage operation (it always removes the temporary
122 files before exiting). Other Salvager subprocesses running at the same
123 time continue until they finish salvaging all other partitions where there is
124 enough disk space for temporary files. To complete the interrupted
125 salvage, reissue the command against the appropriate partitions, adding the
126 <B>-tmpdir</B> argument to redirect the temporary files to a local disk
127 directory that has enough space.
128 <P>The <B>-orphans</B> argument controls how the Salvager handles orphaned
129 files and directories that it finds on server partitions it is
130 salvaging. An <I>orphaned</I> element is completely inaccessible
131 because it is not referenced by the vnode of any directory that can act as its
132 parent (is higher in the filespace). Orphaned objects occupy space on
133 the server partition, but do not count against the volume's quota.
134 <P><STRONG>Cautions</STRONG>
135 <P>Running this command can result in data loss if the Salvager process can
136 repair corruption only by removing the offending data. Consult the
137 <I>IBM AFS Administration Guide</I> for more information.
138 <P><STRONG>Options</STRONG>
139 <DL>
140 <P><DT><B>-server
141 </B><DD>Indicates the file server machine on which to salvage volumes.
142 Identify the machine by IP address or its host name (either fully-qualified or
143 abbreviated unambiguously). For details, see the introductory reference
144 page for the <B>bos</B> command suite.
145 <P><DT><B>-partition
146 </B><DD>Specifies a single partition on which to salvage all volumes.
147 Provide the complete partition name (for example <B>/vicepa</B>) or one of
148 the following abbreviated forms:
149 <PRE>   <B>/vicepa</B>     =     <B>vicepa</B>      =      <B>a</B>      =      <B>0</B>
150    <B>/vicepb</B>     =     <B>vicepb</B>      =      <B>b</B>      =      <B>1</B>
151    
152 </PRE>
153 <P>
154 <P>After <B>/vicepz</B> (for which the index is 25) comes 
155 <PRE>   <B>/vicepaa</B>    =     <B>vicepaa</B>     =      <B>aa</B>     =      <B>26</B>
156    <B>/vicepab</B>    =     <B>vicepab</B>     =      <B>ab</B>     =      <B>27</B>
157    
158 </PRE>
159 <P>and so on through 
160 <PRE>   <B>/vicepiv</B>    =     <B>vicepiv</B>     =      <B>iv</B>     =      <B>255</B>
161     
162 </PRE>
163 <P><DT><B>-volume
164 </B><DD>Specifies the name or volume ID number of a read/write volume to
165 salvage. The <B>-partition</B> argument must be provided along with
166 this one.
167 <P><DT><B>-file
168 </B><DD>Specifies the complete pathname of a file into which to write a trace of
169 the salvage operation, in addition to the <B>/usr/afs/logs/SalvageLog</B>
170 file on the server machine. If the file pathname is local, the trace is
171 written to the specified file on the local disk of the machine where the
172 <B>bos salvage</B> command is issued. If the <B>-volume</B>
173 argument is included, the file can be in AFS, though not in the volume being
174 salvaged. Do not combine this argument with the <B>-showlog</B>
175 flag.
176 <P><DT><B>-all
177 </B><DD>Salvages all volumes on all of the partitions on the machine named by the
178 <B>-server</B> argument.
179 <P><DT><B>-showlog
180 </B><DD>Displays the trace of the salvage operation on the standard output stream,
181 as well as writing it to the <B>/usr/afs/logs/SalvageLog</B> file.
182 Do not combine this flag with the <B>-file</B> argument.
183 <P><DT><B>-parallel
184 </B><DD>Specifies the maximum number of Salvager subprocesses to run in
185 parallel. Provide one of three values:
186 <UL>
187 <P><LI>An integer from the range <B>1</B> to <B>32</B>. A value of
188 <B>1</B> means that a single Salvager process salvages the partitions
189 sequentially.
190 <P><LI>The string <B>all</B> to run up to four Salvager subprocesses in
191 parallel on partitions formatted as logical volumes that span multiple
192 physical disks. Use this value only with such logical volumes.
193 <P><LI>The string <B>all</B> followed immediately (with no intervening space)
194 by an integer from the range <B>1</B> to <B>32</B>, to run the
195 specified number of Salvager subprocesses in parallel on partitions formatted
196 as logical volumes. Use this value only with such logical
197 volumes.
198 </UL>
199 <P>The BOS Server never starts more Salvager subprocesses than there are
200 partitions, and always starts only one process to salvage a single
201 volume. If this argument is omitted, up to four Salvager subprocesses
202 run in parallel.
203 <P><DT><B>-tmpdir
204 </B><DD>Specifies the full pathname of a local disk directory to which the
205 Salvager process writes temporary files as it runs. If this argument is
206 omitted, or specifies an ineligible or nonexistent directory, the Salvager
207 process writes the files to the partition it is currently salvaging.
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><B>-cell</B>
237 </B><DD>Names the cell in which to run the command. Do not combine this
238 argument with the <B>-localauth</B> flag. For more details, see the
239 introductory <B>bos</B> reference page.
240 <P><DT><B><B>-noauth</B>
241 </B><DD>Assigns the unprivileged identity <B>anonymous</B> to the
242 issuer. Do not combine this flag with the <B>-localauth</B>
243 flag. For more details, see the introductory <B>bos</B> reference
244 page.
245 <P><DT><B><B>-localauth</B>
246 </B><DD>Constructs a server ticket using a key from the local
247 <B>/usr/afs/etc/KeyFile</B> file. The <B>bos</B> command
248 interpreter presents the ticket to the BOS Server during mutual
249 authentication. Do not combine this flag with the <B>-cell</B> or
250 <B>-noauth</B> options. For more details, see the introductory
251 <B>bos</B> reference page.
252 <P><DT><B>-help
253 </B><DD>Prints the online help for this command. All other valid options
254 are ignored.
255 </DL>
256 <P><STRONG>Examples</STRONG>
257 <P>The following command salvages all volumes on the <B>/vicepd</B>
258 partition of the machine <B>db3.abc.com</B>:
259 <PRE>   % <B>bos salvage -server db3.abc.com -partition /vicepd</B>
260    
261 </PRE>
262 <P>The following command salvages the volume with volume ID number 536870988
263 on partition <B>/vicepb</B> of the machine
264 <B>fs2.abc.com</B>:
265 <PRE>   % <B>bos salvage -server fs2.abc.com -partition /vicepb -volume 536870988</B>
266    
267 </PRE>
268 <P>The following command salvages all volumes on the machine
269 <B>fs4.abc.com</B>. Six Salvager processes run in
270 parallel rather than the default four.
271 <PRE>   % <B>bos salvage -server fs4.abc.com -all -parallel 6</B>
272     
273 </PRE>
274 <P><STRONG>Privilege Required</STRONG>
275 <P>The issuer must be listed in the <B>/usr/afs/etc/UserList</B> file on
276 the machine named by the <B>-server</B> argument, or must be logged onto a
277 server machine as the local superuser <B>root</B> if the
278 <B>-localauth</B> flag is included.
279 <P><STRONG>Related Information</STRONG>
280 <P><A HREF="auarf023.htm#HDRKEYFILE">KeyFile</A>
281 <P><A HREF="auarf030.htm#HDRSALVAGELOG">SalvageLog</A>
282 <P><A HREF="auarf035.htm#HDRUSERLIST">UserList</A>
283 <P><A HREF="auarf093.htm#HDRBOS_INTRO">bos</A>
284 <P><A HREF="auarf232.htm#HDRSALVAGER">salvager</A>
285 <P><A HREF="auarf255.htm#HDRVOS_BACKUP">vos backup</A>
286 <P><A HREF="auarf270.htm#HDRVOS_RELEASE">vos release</A>
287 <P><A HREF="auarf271.htm#HDRVOS_REMOVE">vos remove</A>
288 <P><A HREF="auarf280.htm#HDRVOS_ZAP">vos zap</A>
289 <P><I>IBM AFS Administration Guide</I>
290 <P>
291 <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="auarf113.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="auarf115.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> 
292 <!-- Begin Footer Records  ========================================== -->
293 <P><HR><B> 
294 <br>&#169; <A HREF="http://www.ibm.com/">IBM Corporation 2000.</A>  All Rights Reserved 
295 </B> 
296 <!-- End Footer Records  ============================================ -->
297 <A NAME="Bot_Of_Page"></A>
298 </BODY></HTML>