NAME
salvager - Initializes the Salvager component of the fs processSYNOPSIS
salvager[ initcmd] [-partition <name of partition to salvage>]
[ -volumeid <volume id to salvage>] [ -debug] [-nowrite]
[ -inodes] [-force] [-oktozap] [-rootinodes]
[ -salvagedirs] [-blockreads]
[ -parallel <# of max parallel partition salvaging>]
[ -tmpdir <name of dir to place tmp files>]
[ -showlog] [-showsuid] [-showmounts]
[ -orphans (ignore | remove | attach)] [ -help]
DESCRIPTION
The salvager command initializes the Salvager component of the "fs" process. In the conventional configuration, its binary file is located in the /usr/lib/openafs directory on a file server machine. 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:- •
- If the volume header is corrupted, the Salvager removes the volume completely and records the removal in its log file, /var/log/openafs/SalvageLog. Issue the vos release or vos backup command to create the read-only or backup volume again.
- •
- 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 vos remove or vos zap command. Then issue the vos release or vos backup command to create it again.
- •
- 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.
- •
- To salvage all of the volumes on one partition, provide the -partition 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.
- •
- To salvage only one volume, combine the -partition and -volumeid arguments. Only that volume is inaccessible to Cache Managers, because the BOS Server does not shutdown the File Server and Volume Server processes.
OPTIONS
- [initcmd]
- Accommodates the command's use of the AFS command parser, and is optional.
- -partition <name of partition to salvage>
- Specifies the name of the partition to salvage. Specify the full partition name using the form /vicepx or /vicep xx. Omit this argument to salvage every partition on the file server machine.
- -volumeid <volume id to salvage>
- Specifies the volume ID of a specific read/write volume to salvage. The -partition argument must be provided along with this one and specify the volume's actual site.
- -debug
- Allows only one Salvager subprocess to run at a time, regardless of the setting of the -parallel option. Include it when running the Salvager in a debugger to make the trace easier to interpret.
- -nowrite
- Brings all undamaged volumes online without attempting to salvage any damaged volumes.
- -inodes
- Records in the /var/log/openafs/SalvageLog file a list of all AFS inodes that the Salvager modified.
- -force
- Inspects all volumes for corruption, not just those that are marked as having been active when a crash occurred.
- -oktozap
- Removes a volume that is so damaged that even issuing the vos zap command with the -force flag is ineffective. Combine it with the -partition and -volumeid arguments to identify the volume to remove. Using this flag will destroy data that cannot be read, so use only with caution and when you're certain that nothing in that volume is still needed.
- -rootinodes
- Records in the /var/log/openafs/SalvageLog file a list of all AFS inodes owned by the local superuser "root".
- -salvagedirs
- 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.
- -blockreads
- 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.
- -parallel <# of max parallel partition salvaging>
- Specifies the maximum number of Salvager subprocesses to run in parallel. Provide one of three values:
- •
- An integer from the range 1 to 32. A value of 1 means that a single Salvager process salvages the partitions sequentially.
- •
- The string "all" 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.
- •
- The string "all" followed immediately (with no intervening space) by an integer from the range 1 to 32, to run the specified number of Salvager subprocesses in parallel on partitions formatted as logical volumes. Use this value only with such logical volumes.
- -tmpdir <name of dir to place tmp files>
- 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.
- -showlog
- Displays on the standard output stream all log data that is being written to the /var/log/openafs/SalvageLog file.
- -showsuid
- Displays a list of the pathnames for all files that have the setuid or setgid mode bit set.
- -showmounts
- Records in the /var/log/openafs/SalvageLog file all mount points found in each volume. The Salvager does not repair corruption in the volumes, if any exists.
- -orphans (ignore | remove | attach)
- Controls how the Salvager handles orphaned files and directories. Choose one of the following three values:
- ignore
- Leaves the orphaned objects on the disk, but prints a message to the /var/log/openafs/SalvageLog file reporting how many orphans were found and the approximate number of kilobytes they are consuming. This is the default if the -orphans argument is omitted.
- remove
- Removes the orphaned objects, and prints a message to the /var/log/openafs/SalvageLog file reporting how many orphans were removed and the approximate number of kilobytes they were consuming.
- attach
- 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:
- "__ORPHANFILE__.index" for files.
- "__ORPHANDIR__.index" for directories.
- -help
- Prints the online help for this command. All other valid options are ignored.
EXAMPLES
The following command instructs the Salvager to attempt to salvage the volume with volume ID 258347486 on /vicepg on the local machine.% /usr/lib/openafs/salvager -partition /vicepg -volumeid 258347486
PRIVILEGE REQUIRED
To issue the command at the shell prompt, the issuer must be logged in as the local superuser "root".SEE ALSO
BosConfig(5), SalvageLog(5), bos_create(8), bos_getlog(8), bos_salvage(8), vos_move(1)COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.2022-12-22 | OpenAFS |