NAME
bos_salvage - Restores internal consistency to a file system or volumeSYNOPSIS
bos salvage -server <machine name>[ -partition <salvage partition>]
[ -volume <salvage volume number or volume name>]
[ -file <salvage log output file>] [ -all] [-showlog]
[ -parallel <# of max parallel partition salvaging>]
[ -tmpdir <directory to place tmp files>]
[ -orphans (ignore | remove | attach)] [ -cell <cell name>]
[ -forceDAFS]
[ -noauth] [-localauth] [-help] bos sa -se <machine name> [-part < salvage partition>]
[ -v <salvage volume number or volume name>]
[ -f <salvage log output file>] [ -a] [-sh]
[<-para> < # of max parallel partition salvaging>]
[ -t <directory to place tmp files>]
[ -o (ignore | remove | attach)] [-c < cell name>] [-n]
[ -force]
[ -l] [-h]
DESCRIPTION
The bos salvage command salvages (restores internal consistency to) one or more volumes on the file server machine named by the -server argument. When processing one or more partitions, the command restores consistency to corrupted read/write volumes 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 process all volumes on a file server machine, provide the -server argument and the -all flag. No volumes on the machine are accessible to Cache Managers during the salvage operation, because the BOS Server stops the File Server and Volume Server processes while the Salvager runs. The BOS Server automatically restarts them when the operation completes.
- •
- To process all volumes on one partition, provide the -server and -partition arguments. As for a salvage of the entire machine, no volumes on the machine are accessible to Cache Managers during the salvage operation. The BOS Server automatically restarts the File Server and Volume Server when the operation completes.
- •
- To salvage only one read/write volume, combine the -server, -partition, and -volume arguments. Only that volume is inaccessible to Cache Managers, because the BOS Server does not shutdown the File Server and Volume Server processes during the salvage of a single volume. Do not name a read-only or backup volume with the -volume argument. Instead, remove the volume, using the vos remove or vos zap command. Then create a new copy of the volume with the vos release or vos backup command.
CAUTIONS
Running this command can result in data loss if the Salvager process can repair corruption only by removing the offending data. Consult the OpenAFS Administration Guide for more information.OPTIONS
- -server <machine name>
- Indicates the file server machine on which to salvage volumes. Identify the machine by IP address or its host name (either fully-qualified or abbreviated unambiguously). For details, see bos(8).
- -partition <salvage partition>
- Specifies a single partition on which to salvage all
volumes. Provide the complete partition name (for example /vicepa)
or one of the following abbreviated forms:
/vicepa = vicepa = a = 0 /vicepb = vicepb = b = 1
After /vicepz (for which the index is 25) comes/vicepaa = vicepaa = aa = 26 /vicepab = vicepab = ab = 27
and so on through/vicepiv = vicepiv = iv = 255
- -volume <salvage volume id or name>
- Specifies the name or volume ID number of a read/write volume to salvage. The -partition argument must be provided along with this one.
- -file <salvage log output file>
- Specifies the complete pathname of a file into which to write a trace of the salvage operation, in addition to the /var/log/openafs/SalvageLog file on the server machine. If the file pathname is local, the trace is written to the specified file on the local disk of the machine where the bos salvage command is issued. If the -volume argument is included, the file can be in AFS, though not in the volume being salvaged. Do not combine this argument with the -showlog flag.
- -all
- Salvages all volumes on all of the partitions on the machine named by the -server argument.
- -showlog
- Displays the trace of the salvage operation on the standard output stream, as well as writing it to the /var/log/openafs/SalvageLog file. Do not combine this flag with the -file argument.
- -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 <directory to place tmp files>
- Specifies the full pathname of a local disk directory to which the Salvager process writes temporary files as it runs. If this argument is omitted, or specifies an ineligible or nonexistent directory, the Salvager process writes the files to the partition it is currently salvaging.
- -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.
- -forceDAFS
- If the fileserver is a Demand Attach File Server, then the -forceDAFS flag must be provided in order for the salvager to run.
- -cell <cell name>
- Names the cell in which to run the command. Do not combine this argument with the -localauth flag. For more details, see bos(8).
- -noauth
- Assigns the unprivileged identity "anonymous" to the issuer. Do not combine this flag with the -localauth flag. For more details, see bos(8).
- -localauth
- Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile or /etc/openafs/server/KeyFileExt file. The bos command interpreter presents the ticket to the BOS Server during mutual authentication. Do not combine this flag with the -cell or -noauth options. For more details, see bos(8).
- -help
- Prints the online help for this command. All other valid options are ignored.
EXAMPLES
The following command salvages all volumes on the /vicepd partition of the machine "db3.example.com":% bos salvage -server db3.example.com -partition /vicepdThe following command salvages the volume with volume ID number 536870988 on partition /vicepb of the machine "fs2.example.com":
% bos salvage -server fs2.example.com -partition /vicepb -volume 536870988The following command salvages all volumes on the machine "fs4.example.com". Six Salvager processes run in parallel rather than the default four.
% bos salvage -server fs4.example.com -all -parallel 6
PRIVILEGE REQUIRED
The issuer must be listed in the /etc/openafs/server/UserList file on the machine named by the -server argument, or must be logged onto a server machine as the local superuser "root" if the -localauth flag is included.SEE ALSO
KeyFile(5), KeyFileExt(5), SalvageLog(5), UserList(5), bos(8), salvager(8), salvageserver(8), vos_backup(1), vos_release(1), vos_remove(1), vos_zap(1) The OpenAFS Administration Guide at <http://docs.openafs.org/AdminGuide/>.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 |