archive_audit - Generate an archive audit
∕opt∕SUNWsamfs∕sbin∕archive_audit
[
-f
audit_file
] [
-V
] [
-d
] [
-c
archive_copy_number
]…
root_path
SUNWsamfs
archive_audit
generates an audit of all archived files and removable media files (excluding
archiver and stager removable media files, and removable media files created
for disaster recovery which have not yet been referenced)
in the Oracle HSM directory
root_path
by media type and VSN.
The audit results are written to the VSN audit file.
An optional summary of all archive VSNs is written to standard output.
Note that archive_audit will not be able to distinguish removable media files used by the stager daemon in file systems which have been created in systems prior to version 4.0 and upgraded, so these sizes will be counted in the totals. Also, removable media files created by a user for disaster recovery purposes may duplicate space on a volume assigned to an archive copy, in which case the space will be accounted for twice.
-c
archive_copy_number Only archive copies for the indicated archive_copy_number will
be examined. Multiple -c
archive_copy_number options may
be given; then archive copies for any of the archive_copy_numbers
will be examined.
-d
Only damaged archive copies are listed in the VSN audit file.
-f
audit_file The name of the VSN audit file. If -f is not specified, or if
audit_file is "-", then the output is written to standard out.
Archive_audit
appends to the audit_file.
-V
Verbose. Write the optional summary to standard output. Each file is summarized in the following format:
media VSN n files, s bytes, d damaged copies.
Where media is the media type, VSN is the VSN, n is the number of files on that VSN, and s is the number of bytes of data archived on that VSN. d is the number of damaged archive copies on that VSN.
The VSN audit file contains a 1-line entry for each section on an archived file or removable media file. Each entry has this information:
media vsn status copy section position size file seg_num disk_path
where:
media is the volume's media type.
VSN is the Volume Serial Number that uniquely identifies the volume within the library.
status is a sequence of four flags that show the archival status of the copy:
Flag 1 is either -
for valid, current data or S
for stale data.
Flag 2 is either -
for files that will not be rearchived or r
for files that will be rearchived.
Flag 3 is either -
for undamaged copies or Dr
for damaged files.
Flag 4 is always -
copy is a number in the range [1-4] that specifies the archive copy number of the copy that resides on this volume or zero if the file is a removable media file.
section is the section number of a segmented file, a number in the range [0-n].
position is position and offset of the file on the media.
size is the size of the file∕section.
file is the file-system path and name of the archived file or the removable media file.
seg_num is the segment number of the archived segment of the file. seg_num is 0 if it is a segmented file's index inode or if the entry is a directory ora non-segmented file. Data segments of a segmented file are numbered sequentially beginning with 1.
disk_path is the path to the tar archive containing this file on the disk archive volume. If the volume is not a disk archive, this field is blank..LP
The following is an example of an entry in the archive_audit
audit file:
lt\0DLT000\0----\01\00\04ffd.9fa5e\0169643\0∕sam5∕QT∕rainbow.sgi\06
The media-type
field shows that this copy resides on DLT (lt
) media.
The VSN
field shows that this copy resides on volume DLT000
.
The flags in the status
field show that the copy is current, will not be rearchived, and is undamaged.
The copy number
field shows that this is copy 1
.
The section
field is set to 0
, so the copy is not part of a segmented file stored on multiple volumes.
In the position
field, the hex number before the dot, 4ffd
, is the start of the archive file on the media. The hex number following the dot, 9fa5e
, is the start of the data file copy relative to the start of the archive file, expressed as the byte offset divided by 512.
The size field holds the section size (segmented archive file) or the file size (unsegmented archive file or removable media file).
The file
field holds the path and name of the archive file or removable media file, ∕sam5∕QT∕rainbow.sgi
.
The seg_num
fields holds the segment number 0
, which indicates that this is either an unsegmented file or the index inode of a segmented file.
The disk_path
field is blank since this is a tape archive. For a disk archive, the field would hold a path such as ∕diskvols∕d3∕f198
.
The following exit values are returned:
0
Audit completed successfully.
6
Nonfatal: An issue encountered with rootpath's filename or the path.
7
Nonfatal: Closing of a subdirectory under the rootpath failed.
10
Nonfatal: sam_segment_vsn_stat for a file failed.
11
Nonfatal: sam_vsn_stat for a file failed.
12
Nonfatal: sam_readrminfo for a file failed.
13
Nonfatal: idstat for a file failed.
14
Nonfatal: getdent for a directory failed.
15
Nonfatal: Invalid segment size for a file encountered.
30
Fatal: Command line argument errors.
31
Fatal: Audit file issues were encountered.
32
Fatal: An issue with the root path or a subdirectory was encountered.
35
Fatal: Malloc errors terminated archive_audit
.