NAME

bos_salvage - Restores internal consistency to a file system or volume

SYNOPSIS

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>] [-salvagedirs] [-forceDAFS] [-noauth] [-localauth] [-principal <authentication principal> [-encrypt [<yes|no>]] [-config <configuration file>] [-help]

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:

Use the indicated arguments to salvage a specific number of volumes:

The Salvager always writes a trace to the /var/log/yfs/SalvageLog file on the file server machine where it runs. To record the trace in another file as well (either in AFS or on the local disk of the machine where the bos salvage command is issued), name the file with the -file argument. To display the trace on the standard output stream as it is written to the /var/log/yfs/SalvageLog file, include the -showlog flag.

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 -parallel argument.

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 all as the value for the -parallel argument. Provide a positive integer to specify the number of subprocesses to run in parallel (for example, -parallel all5 for five subprocesses), or omit the integer to run up to four subprocesses, depending on the number of logical volumes being salvaged.

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 -tmpdir argument to redirect the temporary files to a local disk directory that has enough space.

The -orphans argument controls how the Salvager handles orphaned files and directories that it finds on server partitions it is salvaging. An orphaned 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.

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/yfs/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/yfs/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:

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.

-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/yfs/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/yfs/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.

where index 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 ls command issued against the volume's root directory.

-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.

-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/yfs/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).

-principal <authentication principal>

Indicates the principal to be used for authentication. This option can be useful when several credentials caches are available for different principals.

-encrypt [<yes|no>]

Enables or disables encryption for the command so that the operation's results are not transmitted across the network in clear text.

-verbose

Produces on the standard output stream a detailed trace of the command's execution. If this argument is omitted, only warnings and error messages appear.

-config <configuration file>

Sets the location of the configuration file to be used. The default file is /etc/yfs/yfs-client.conf.

-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 /vicepd

The 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 536870988

The 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/yfs/server/UserListExt file on the machine named by the -server argument, or must be logged onto a server with an account capable of reading the /etc/yfs/server/KeyFileExt file if the -localauth flag is included.

SEE ALSO

KeyFileExt(5), SalvageLog(5), UserListExt(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.

ACKNOWLEDGEMENTS

"AFS" is a registered mark of International Business Machines Corporation, used under license. (USPTO Registration 1598389)

"OpenAFS" is a registered mark of International Business Machines Corporation. (USPTO Registration 4577045)

The "AuriStor" name, log 'S' brand mark, and icon are registered marks of AuriStor, Inc. (USPTO Registrations 4849419, 4849421, and 4928460) (EUIPO Registration 015539653).

"Your File System" is a registered mark of AuriStor, Inc. (USPTO Registrations 4801402 and 4849418).

"YFS" and "AuriStor File System" are trademarks of AuriStor, Inc.