The Salvager displays output on standard output and standard error. When the salvage command is first executed, the Salvager displays the device name of the aggregate on which it is to run and the operation it is to perform. For example, the Salvager displays the following message if it is instructed to recover an aggregate:
Will run recovery on device
If you use the Salvager to recover an aggregate and the log on the aggregate does not need to be replayed, the Salvager displays only the brief introductory information. If the log does need to be replayed and the Salvager can successfully recover the aggregate, the Salvager displays the following messages:
Recovery statistics
statistics
Ran recovery on device
In the output, statistics consists of a few lines of information about the log and its replaying, and device is again the device name of the recovered aggregate. If recovery fails for any reason, the Salvager returns an appropriate exit code. (All Salvager exit codes are described at the end of this section.)
The Salvager can display much more output if it is used to verify or salvage an aggregate on which it finds metadata errors. As it verifies or salvages a damaged aggregate, it displays a message similar to the following for each fileset in which it encounters metadata problems:
In volume fileset (avl #integer)
in anode (#integer)
description
It displays the first line once for each fileset, repeating the second and third lines once for each problem anode in the fileset. An anode is an area on disk that provides information used to locate data such as files, directories, ACLs, and other types of file system objects. Each fileset contains an arbitrary number of anodes, all of which must reside on the same aggregate.
In the output, fileset is the name and ID number of each affected fileset; avl #integer indicates the anode for the fileset; in anode (#integer) indicates the anode for a file or other object in the fileset; and description provides a brief description of the problem the Salvager found with the anode (and any actions it took as a result, if it is salvaging the aggregate).
When it has finished executing, the Salvager lists files whose metadata it found to be damaged, many of which it likely repaired if it salvaged the aggregate. For each file, it displays a line of the form
condition fileset:pathname volume index: integer anode index: integer
In the output, condition is a string that describes the state of the file or its metadata; fileset is the name of the fileset in which the affected file resides; and pathname is the path name of the file, relative to the root directory of the fileset. Note that the Salvager may not be able to determine the fileset name or reconstruct the path name for every file.
The volume index: integer and anode index: integer provide pointers to the anodes that are associated with filesets and files whose metadata was damaged (and possibly repaired). The volume index indicates the anode for the fileset; the anode index indicates the anode for the file. Anode-related information is not useful for verifying or restoring data on an aggregate, but it does serve to identify earlier messages displayed by the Salvager that are related to this file.
The following conditions accompany the files most in need of attention:
oughtRestore
Files in which one or more block references in the associated anode were removed or changed. Because it is unlikely that such files contain all of their original
data, these files should be restored from existing backups. This condition applies only to files on salvaged aggregates.
mayRestore
Files to which modifications were made (for example, files whose ACLs or property lists were changed). The owners of these files should verify their contents, or a
system administrator should simply restore them from backups if a directory listing indicates that they have not been modified since the last backup was made. This condition also applies only to
files on salvaged aggregates.
zeroLinkCnt
Files whose link counts should be 0 (zero). These files were deleted but not closed when the system crashed or were orphaned by the Salvager as it made
repairs to the file system. The system will delete them when the aggregate is exported.
badLinkCnts
Files whose link counts were inconsistent with the number of references found to them. These files should be examined, if possible, or simply restored.
The Salvager can list a file more than once if it finds that multiple conditions apply to the file. It can also display one or more additional conditions, but files with which the additional conditions are associated are usually already covered by one or more of the conditions just described.
The Salvager also returns one of various exit codes summarizing its actions and findings. It returns the exit codes in the form of bits, which it uses to indicate the state of the aggregate. It can set multiple bits, but in general, the higher the bit, the greater the severity of the aggregate's problems; the higher bit always takes precedence when interpreting the output. The Salvager can return the following exit codes:
All bits off
The Salvager found no problems. It displays a message that includes Done and Checks out. The command need not be run again.
First bit (0x1) set
The Salvager found one or more problems. It displays a message that includes Done and Some inconsistencies found. Run the
command on the aggregate without the -verifyonly option to attempt to correct the problems.
Second bit (0x2) set
The Salvager found one or more problems and fixed them. It displays a message that includes Done and Some inconsistencies repaired. The
command need not be run again. (Note that if the second bit is set, the first bit is typically set as well; because the higher bit takes precedence, you do not need to run the command again.)
Third bit (0x4) set
The Salvager found one or more problems and fixed some of them. It displays a message that includes Incomplete and Some repairs made.
Some of the problems were more severe and require a subsequent salvage to be repaired; run the command on the aggregate without the -verifyonly option to attempt to correct the problems.
Fourth bit (0x8) set
The Salvager found the aggregate to be irreparably damaged. It displays a message that begins Problem. Use the newaggr command to
reinitialize the aggregate, and reconstruct the data from existing backups if possible.
Fifth bit (0x10) set
The Salvager found some serious problem that prevents it from running; for example, the attempted recovery of the aggregate failed because of damage to the
log, or the attempted salvage of the aggregate failed because the aggregate is not a DCE LFS aggregate or it is currently exported. The Salvager displays a message that begins Problem.
Attempt to determine the cause of the problem.
Including the -verbose option with the salvage command causes the Salvager to produce more detailed information about the aggregate. Much of the additional information is useful primarily for debugging purposes.