Content-type: text/html
salvage - Recover file data from damaged AdvFS file domains
/sbin/advfs/salvage [-x|-p] [-l] [-S] [-v number] [-d time] [-D directory] [-L path] [-o option] [-F format[-f[archive]]] {-V special [-V special]...|domain} [fileset[path]]
Specifies that the utility attempt to recover only those files that have been modified after the time. Specify the time as a decimal number in the following format: [[CC]YY]MMDDhhmm[.SS]
Specifies the name of an existing AdvFS file domain from which filesets are to be recovered. Use this parameter when you want the utility to obtain volume information from the /etc/fdmns directory. The volume information used by the utility consists of the device special file names of the AdvFS volumes in the file domain. When the domain operand is specified without optional arguments, the utility attempts to recover the files in all filesets in the domain.
The salvage utility helps you recover file data after an AdvFS file domain has become unmountable due to some type of data corruption. Errors that could cause data corruption of a file domain include I/O errors in file system metadata, the accidental removal of a volume, or any I/O error that produces a panic.
Use the
salvage
utility as a last resort. You should
first repair domain structures by using the
verify
utility.
If that repair method is unsatisfactory, attempt to recover fileset data
from backup media. Only if both methods are unsatisfactory should you employ
the
salvage
utility.
As the utility recovers files, it writes temporary files to a subdirectory
of the recovery directory, and uses these files to process the on-disk structures
it is reading. The utility deletes these temporary files when it exits.
The following are log file message formats: The general format is:
fileset/file : uid : gid : size : bytes recovered : type : file status...
For example, for a regular file:
user_fs/data.file : 3500 : 15 : 56116 : 56116 : REG : file successfully \
recovered
For example, for a directory:
user_fs/data/ : 3500 : 15 : 8192 : 8192 : DIR : file successfully \ recovered
For a file and a directory, when its name cannot be found:
user_fs/data.file.lost+found/tag_12345 : 0 : 10 : 24576 : 24576 : REG :\
filename not recovered
user_fs/data/lost+found/tag_54321/ : 0 : 10 : 8192 : 8192 : DIR :\
directory not recovered
For a file, when the ending fragment cannot be found:
user_fs/data.file : 3500: 15 : 56116 : 55092 : REG : file truncated by \
1024 bytes
For a file, when not all the file's pages can be recovered:
user_fs/data.file : 3500 : 15 : 1646592 : 24576 : REG : Incomplete file,\
hole between bytes MMMMM and NNNNN, bytes XXXXX and YYYYY
For a file, when it has an entry in a directory but cannot be found on disk:
user_fs/data.file : 3500 : 15 : 56116 : 0 : REG : Unable to locate file
The salvage utility opens and reads block devices directly and could present a security issue if it recovers data remaining from previous AdvFS file domains while attempting to recover data from current AdvFS file domains.
The salvage utility can be run in single-user mode, without mounting other file systems. The salvage utility is available from the UNIX Shell option when you are booting from the Tru64 UNIX Operating System Volume 1 CD-ROM.
The salvage utility can find metadata on disk that appears valid but might not be: in most cases, the utility can determine when this suspect metadata should be used or ignored. One of these problems that the utility cannot detect is the situation when the metadata contains a tag number that could be valid on a very large fileset, but is invalid for common filesets. In this case, the utility creates a partial file in the lost+found directory.
The
salvage
utility has a builtin soft limit on the
number of valid tags in a fileset: 10,000,000 tags. If an application should
exceed this soft limit, the user is prompted about increasing the limit. For
example:
salvage: Current soft-limit on tag array 10000000; increase size \
to 538977250?
If you answer y to the prompt, the soft limit is increased to the new value. If you answer n to the prompt, the hard limit is set to the new value and you will not be prompted for tabs larger than this new limit.
If increasing this limit causes a memory error, rerun the utility without
increasing the limit.
You must be the root user to use the salvage utility.
Before using the
salvage
utility, all filesets in
the domain you are trying to recover probably have been already unmounted.
However, use the
umount(8)
command to ensure that the filesets are unmounted. If all
filesets are not unmounted, the utility displays an error message exits with
an exit value of 2.
The exit values for the
salvage
utility are:
Success
Partial recovery
Failure, including command line syntax errors
The
salvage
utility error diagnostics cause the utility
to exit with an exit code of 2. The diagnostics are:
salvage: Error - Out of memory
The utility does not have enough memory
salvage: Error - No such file or directory
The file or directory you specified could not be found on the device specified.
salvage: Error - I/O error
An I/O error occurred during the salvage operation.
salvage: Error - No space left in recovery directory
The directory to which the recovered files are written is full.
The following example shows a salvage command that uses all the defaults to recover all files from the AdvFS file domain named user_domain. Other results include: A log file named salvage.log.pid is written to the fixit directory The files that are recovered from the user_domain are also written to the fixit directory Partially-recoverable files are recovered. These files are written to the fixit directory. The extension .partial is not appended to the name of each file. # cd /fixit # /sbin/advfs/salvage -p 9611200000 user_domain The following example shows a salvage command that uses the -d option to recover all the file in the domain user_domain that have been changed after that date. # cd /fixit # /sbin/advfs/salvage -d 9611200000 user_domain The following example shows a salvage command that recovers the file data.file, whether or not it is only partially recoverable, from the fileset user_fileset on the volume mounted as /dev/rz3c.
Contains AdvFS file domain names and devices
Contains static information about file systems and filesets
Commands: umount(8), verify(8), vrestore(8)
Files: fdmns(4)