initial-html-documentation-20010606
[openafs.git] / doc / html / AdminReference / auarf232.htm
diff --git a/doc/html/AdminReference/auarf232.htm b/doc/html/AdminReference/auarf232.htm
new file mode 100644 (file)
index 0000000..b00311e
--- /dev/null
@@ -0,0 +1,265 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 4//EN">
+<HTML><HEAD>
+<TITLE>Administration Reference</TITLE>
+<!-- Begin Header Records  ========================================== -->
+<!-- /tmp/idwt3672/auarf000.scr converted by idb2h R4.2 (359) ID      -->
+<!-- Workbench Version (AIX) on 3 Oct 2000 at 16:18:30                -->
+<META HTTP-EQUIV="updated" CONTENT="Tue, 03 Oct 2000 16:18:29">
+<META HTTP-EQUIV="review" CONTENT="Wed, 03 Oct 2001 16:18:29">
+<META HTTP-EQUIV="expires" CONTENT="Thu, 03 Oct 2002 16:18:29">
+</HEAD><BODY>
+<!-- (C) IBM Corporation 2000. All Rights Reserved    --> 
+<BODY bgcolor="ffffff"> 
+<!-- End Header Records  ============================================ -->
+<A NAME="Top_Of_Page"></A>
+<H1>Administration Reference</H1>
+<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> 
+<P>
+<H2><A NAME="HDRSALVAGER" HREF="auarf002.htm#ToC_246">salvager</A></H2>
+<A NAME="IDX5443"></A>
+<A NAME="IDX5444"></A>
+<A NAME="IDX5445"></A>
+<A NAME="IDX5446"></A>
+<P><STRONG>Purpose</STRONG>
+<P>Initializes the Salvager component of the <B>fs</B> process
+<P><STRONG>Synopsis</STRONG>
+<PRE><B>salvager</B> [<B>initcmd</B>]  [<B>-partition</B> &lt;<VAR>Name&nbsp;of&nbsp;partition&nbsp;to&nbsp;salvage</VAR>>] 
+         [<B>-volumeid</B> &lt;<VAR>Volume&nbsp;Id&nbsp;to&nbsp;salvage</VAR>>]  [<B>-debug</B>]  
+         [<B>-nowrite</B>]  [<B>-inodes</B>]  [<B>-force</B>]  [<B>-oktozap</B>]  
+         [<B>-rootinodes</B>]  [<B>-salvagedirs</B>]  [<B>-blockreads</B>]  
+         [<B>-parallel</B> &lt;<VAR>#&nbsp;of&nbsp;max&nbsp;parallel&nbsp;partition&nbsp;salvaging</VAR>>]
+         [<B>-tmpdir</B> &lt;<VAR>Name&nbsp;of&nbsp;dir&nbsp;to&nbsp;place&nbsp;tmp&nbsp;files</VAR>>]  
+         [<B>-showlog</B>]  [<B>-showsuid</B>]  [<B>-showmounts</B>] 
+         [<B>-orphans</B> &lt;<B>ignore</B> | <B>remove</B> | <B>attach</B>>] [<B>-help</B>]
+</PRE>
+<P>This command does not use the syntax conventions of the AFS command
+suites. Provide the command name and all option names in full.
+<P><STRONG>Description</STRONG>
+<P>The <B>salvager</B> command initializes the Salvager component of the
+<B>fs</B> process. In the conventional configuration, its binary
+file is located in the <B>/usr/afs/bin</B> directory on a file server
+machine.
+<P>The Salvager restores internal consistency to corrupted read/write volumes
+on the local file server machine where possible. For read-only or
+backup volumes, it inspects only the volume header:
+<UL>
+<P><LI>If the volume header is corrupted, the Salvager removes the volume
+completely and records the removal in its log file,
+<B>/usr/afs/logs/SalvageLog</B>. Issue the <B>vos release</B>
+or <B>vos backup</B> command to create the read-only or backup volume
+again.
+<P><LI>If the volume header is intact, the Salvager skips the volume (does not
+check for corruption in the contents). However, if the File Server
+notices corruption as it initializes, it sometimes refuses to attach the
+volume or bring it online. In this case, it is simplest to remove the
+volume by issuing the <B>vos remove</B> or <B>vos zap</B>
+command. Then issue the <B>vos release</B> or <B>vos backup</B>
+command to create it again.
+</UL>
+<P>Unlike other server process initialization commands, the
+<B>salvager</B> command is designed to be issued at the command shell
+prompt, as well as being placed into a file server machine's
+<B>/usr/afs/local/BosConfig</B> file with the <B>bos create</B>
+command. It is also possible to invoke the Salvager remotely by issuing
+the <B>bos salvage</B> command.
+<P>Combine the command's options as indicated to salvage different
+numbers of read/write volumes:
+<UL>
+<P><LI>To salvage all volumes on the file server machine, provide no
+arguments. No volumes on the machine are accessible to Cache Managers
+during the salvage, because the BOS Server stops the File Server and Volume
+Server processes while the Salvager runs.
+<P><LI>To salvage all of the volumes on one partition, provide the
+<B>-partition</B> argument. As for a salvage of all volumes on the
+machine, no volumes on the machine are accessible to Cache Managers during the
+salvage operation.
+<P><LI>To salvage only one volume, combine the <B>-partition</B> and
+<B>-volumeid</B> arguments. Only that volume is inaccessible to
+Cache Managers, because the BOS Server does not shutdown the File Server and
+Volume Server processes.
+</UL>
+<P>The Salvager normally salvages only those read/write volumes that are
+marked as having been active when a crash occurred. To have it salvage
+all relevant read/write volumes, add the <B>-force</B> flag.
+<P>The Salvager normally creates new inodes as it repairs damage. If
+the partition is so full that there is no room for new inodes, use the
+<B>-nowrite</B> argument to bringing undamaged volumes online without
+attempting to salvage damaged volumes. Then use the <B>vos move</B>
+command to move one or more of the undamaged volumes to other partitions,
+freeing up the space that the Salvager needs to create new inodes.
+<P>By default, multiple Salvager subprocesses run in parallel: one for
+each partition up to four, and four subprocesses for four or more
+partitions. To increase or decrease the number of subprocesses running
+in parallel, provide a positive integer value for the <B>-parallel</B>
+argument.
+<P>If there is more than one server partition on a physical disk, the Salvager
+by default salvages them serially to avoid the inefficiency of constantly
+moving the disk head from one partition to another. However, this
+strategy is often not ideal if the partitions are configured as logical
+volumes that span multiple disks. To force the Salvager to salvage
+logical volumes in parallel, provide the string <B>all</B> as the value
+for the <B>-parallel</B> argument. Provide a positive integer to
+specify the number of subprocesses to run in parallel (for example,
+<B>-parallel 5all</B> for five subprocesses), or omit the integer to run
+up to four subprocesses, depending on the number of logical volumes being
+salvaged.
+<P>The Salvager creates temporary files as it runs, by default writing them to
+the partition it is salvaging. The number of files can be quite large,
+and if the partition is too full to accommodate them, the Salvager terminates
+without completing the salvage operation (it always removes the temporary
+files before exiting). Other Salvager subprocesses running at the same
+time continue until they finish salvaging all other partitions where there is
+enough disk space for temporary files. To complete the interrupted
+salvage, reissue the command against the appropriate partitions, adding the
+<B>-tmpdir</B> argument to redirect the temporary files to a local disk
+directory that has enough space.
+<P>The <B>-orphans</B> argument controls how the Salvager handles orphaned
+files and directories that it finds on server partitions it is
+salvaging. An <I>orphaned</I> element is completely inaccessible
+because it is not referenced by the vnode of any directory that can act as its
+parent (is higher in the filespace). Orphaned objects occupy space on
+the server partition, but do not count against the volume's quota.
+<P>To generate a list of all mount points that reside in one or more volumes,
+rather than actually salvaging them, include the <B>-showmounts</B>
+flag.
+<P><STRONG>Options</STRONG>
+<DL>
+<P><DT><B>initcmd
+</B><DD>Accommodates the command's use of the AFS command parser, and is
+optional.
+<P><DT><B>-partition
+</B><DD>Specifies the name of the partition to salvage. Specify the full
+partition name using the form <B>/vicep</B><VAR>x</VAR> or
+<B>/vicep</B><VAR>xx</VAR>. Omit this argument to salvage every
+partition on the file server machine.
+<P><DT><B>-volumeid
+</B><DD>Specifies the volume ID of a specific read/write volume to salvage.
+The <B>-partition</B> argument must be provided along with this one and
+specify the volume's actual site.
+<P><DT><B>-debug
+</B><DD>Allows only one Salvager subprocess to run at a time, regardless of the
+setting of the <B>-parallel</B> option. Include it when running the
+Salvager in a debugger to make the trace easier to interpret.
+<P><DT><B>-nowrite
+</B><DD>Brings all undamaged volumes online without attempting to salvage any
+damaged volumes.
+<P><DT><B>-inodes
+</B><DD>Records in the <B>/usr/afs/logs/SalvageLog</B> file a list of all AFS
+inodes that the Salvager modified.
+<P><DT><B>-force
+</B><DD>Inspects all volumes for corruption, not just those that are marked as
+having been active when a crash occurred.
+<P><DT><B>-oktozap
+</B><DD>Removes a volume that is so damaged that even issuing the <B>vos
+zap</B> command with the <B>-force</B> flag is ineffective. Use
+this argument only in consultation with AFS Development or Product
+Support. Combine it with the <B>-partition</B> and
+<B>-volumeid</B> arguments to identify the volume to remove.
+<P><DT><B>-rootinodes
+</B><DD>Records in the <B>/usr/afs/logs/SalvageLog</B> file a list of all AFS
+inodes owned by the local superuser <B>root</B>.
+<P><DT><B>-salvagedirs
+</B><DD>Salvages entire directory structures, even if they do not appear to be
+damaged. By default, the Salvager salvages a directory only if it is
+flagged as corrupted.
+<P><DT><B>-blockreads
+</B><DD>Forces the Salvager to read a partition one disk block (512 bytes) at a
+time and to skip any blocks that are too badly damaged to be salvaged.
+This allows it to salvage as many volumes as possible. By default, the
+Salvager reads large disk blocks, which can cause it to exit prematurely if it
+encounters disk errors. Use this flag if the partition to be salvaged
+has disk errors.
+<P><DT><B>-parallel
+</B><DD>Specifies the maximum number of Salvager subprocesses to run in
+parallel. Provide one of three values:
+<UL>
+<P><LI>An integer from the range <B>1</B> to <B>32</B>. A value of
+<B>1</B> means that a single Salvager process salvages the partitions
+sequentially.
+<P><LI>The string <B>all</B> to run up to four Salvager subprocesses in
+parallel on partitions formatted as logical volumes that span multiple
+physical disks. Use this value only with such logical volumes.
+<P><LI>The string <B>all</B> followed immediately (with no intervening space)
+by an integer from the range <B>1</B> to <B>32</B>, to run the
+specified number of Salvager subprocesses in parallel on partitions formatted
+as logical volumes. Use this value only with such logical
+volumes.
+</UL>
+<P>The BOS Server never starts more Salvager subprocesses than there are
+partitions, and always starts only one process to salvage a single
+volume. If this argument is omitted, up to four Salvager subprocesses
+run in parallel.
+<P><DT><B>-tmpdir
+</B><DD>Names a local disk directory in which the Salvager places the temporary
+files it creates during a salvage operation, instead of writing them to the
+partition being salvaged (the default). If the Salvager cannot write to
+the specified directory, it attempts to write to the partition being
+salvaged.
+<P><DT><B>-showlog
+</B><DD>Displays on the standard output stream all log data that is being written
+to the <B>/usr/afs/logs/SalvageLog</B> file.
+<P><DT><B>-showsuid
+</B><DD>Displays a list of the pathnames for all files that have the setuid or
+setgid mode bit set.
+<P><DT><B>-showmounts
+</B><DD>Records in the <B>/usr/afs/logs/SalvageLog</B> file all mount points
+found in each volume. The Salvager does not repair corruption in the
+volumes, if any exists.
+<P><DT><B>-orphans
+</B><DD>Controls how the Salvager handles orphaned files and directories.
+Choose one of the following three values:
+<DL>
+<P><DT><B>ignore
+</B><DD>Leaves the orphaned objects on the disk, but prints a message to the
+<B>/usr/afs/logs/SalvageLog</B> file reporting how many orphans were found
+and the approximate number of kilobytes they are consuming. This is the
+default if the <B>-orphans</B> argument is omitted.
+<P><DT><B>remove
+</B><DD>Removes the orphaned objects, and prints a message to the
+<B>/usr/afs/logs/SalvageLog</B> file reporting how many orphans were
+removed and the approximate number of kilobytes they were consuming.
+<P><DT><B>attach
+</B><DD>Attaches the orphaned objects by creating a reference to them in the vnode
+of the volume's root directory. Since each object's actual
+name is now lost, the Salvager assigns each one a name of the following
+form: 
+<DL>
+<DD><P><B>_ _ORPHANFILE_ _.</B><VAR>index</VAR> for files
+<DD><P><B>_ _ORPHANDIR_ _.</B><VAR>index</VAR> for directories
+</DL>
+<P>
+<P>where <VAR>index</VAR> is a two-digit number that uniquely identifies each
+object. The orphans are charged against the volume's quota and
+appear in the output of the <B>ls</B> command issued against the
+volume's root directory.
+</DL>
+<P><DT><B>-help
+</B><DD>Prints the online help for this command. All other valid options
+are ignored.
+</DL>
+<P><STRONG>Examples</STRONG>
+<P>The following command instructs the Salvager to attempt to salvage the
+volume with volume ID 258347486 on <B>/vicepg</B> on the local
+machine.
+<PRE>   % <B>/usr/afs/bin/salvager -partition /vicepg -volumeid 258347486</B>
+   
+</PRE>
+<P><STRONG>Privilege Required</STRONG>
+<P>To issue the command at the shell prompt, the issuer must be logged in as
+the local superuser <B>root</B>.
+<P><STRONG>Related Information</STRONG>
+<P><A HREF="auarf016.htm#HDRBOSCONFIG">BosConfig</A>
+<P><A HREF="auarf030.htm#HDRSALVAGELOG">SalvageLog</A>
+<P><A HREF="auarf098.htm#HDRBOS_CREATE">bos create</A>
+<P><A HREF="auarf102.htm#HDRBOS_GETLOG">bos getlog</A>
+<P><A HREF="auarf114.htm#HDRBOS_SALVAGE">bos salvage</A>
+<P><A HREF="auarf268.htm#HDRVOS_MOVE">vos move</A>
+<P>
+<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> 
+<!-- Begin Footer Records  ========================================== -->
+<P><HR><B> 
+<br>&#169; <A HREF="http://www.ibm.com/">IBM Corporation 2000.</A>  All Rights Reserved 
+</B> 
+<!-- End Footer Records  ============================================ -->
+<A NAME="Bot_Of_Page"></A>
+</BODY></HTML>