Skip Navigation Links | |
Exit Print View | |
Sun QFS and Sun Storage Archive Manager 5.3 Reference Manual Sun QFS and Sun Storage Archive Manager 5.3 Information Library |
1. User Commands (Man Pages Section 1)
2. Maintenance Commands (Man Pages Section 1M)
3. Library Functions (Man Pages Section 3)
4. Library Functions (Man Pages Section 3X)
5. File Formats (Man Pages Section 4)
NAME archive_audit - Generate an archive audit SYNOPSIS /opt/SUNWsamfs/sbin/archive_audit [ -f audit_file ] [ -V ] [ -d ] [ -c archive_copy_number ]... root_path AVAILABILITY SUNWsamfs DESCRIPTION archive_audit generates an audit of all archived files and removable media files (excluding archiver and stager remov- able media files, and removable media files created for disaster recovery which have not yet been referenced) in the SAM-QFS directory root_path by media type and VSN. The audit results are written to the VSN audit file. An optional sum- mary 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 sys- tems which have been created in systems prior to Sun StorEdge SAM-FS 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. OPTIONS -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 out- put 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. VSN AUDIT FILE 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 The format for the line is "%s %s %s %d %d %llx.%llx %lld %s %d %s\n". media is the archive media. VSN is the archive VSN. status is the archive copy status. Status is 4 dashes with 3 possible flags: S = Stale, r = rearchive, D = damaged. copy is the number (1..4) of the archive copy residing on that VSN. or zero if the file is a removable media file, section is the section number (0..n), position is position and file offset. size is the size of the file/section. file is the path 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 or a 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. The following is an example of the archive_audit line: lt DLT000 ---- 1 0 4ffd.9fa5e 169643 /sam5/QT/rainbow.sgi 6 The first two fields indicate the media type and the volume serial name on which the archive copy or removable media file resides. The next field consists of four dashes as follows: Dash 0 - Stale or active entry S the archive copy is stale. This means the file was modified and this archive copy is for a previous version of the file. - the archive copy is active and valid. Dash 1 - Archive status r The archiver will rearchive this copy. - This archive copy will not be rearchived. Dash 3 - Damaged or undamaged status D the archive copy is damaged. This archive copy will not be staged. - the archive copy is not damaged. It is a can- didate for staging. The next field shows copy number, 1..4, for the archive copy or zero for the removable media file. The next field shows section number, 0..n, for a multi- volume archive file or removable media file. The first hex number, 4ffd, is the position of the beginning of the archive file on the media. The second hex number, 9fa5e, is the file byte offset divided by 512 of this copy on the archive file. For example, 1 means this is the first file on the archive file because it is offset by 512 bytes, which is the length of the tar header. The next field shows section size (file size if only 1 sec- tion) for an archive file or the file size for a removable media file. The eighth field is the name of the archive file or remov- able media file. The ninth field shows the number of the archived file's seg- ment. This field is 0 if the archive copy is of the seg- mented file's index inode or if the archived file is not segmented. The last field is blank since this is a tape archive. For a disk archive it would have a path such as "d3/f198". EXIT STATUS 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 encoun- tered. 30 Fatal: Command line argument errors. 31 Fatal: Audit file issues were encountered. 32 Fatal: An issue with the root path or a subdirec- tory was encountered. 35 Fatal: Malloc errors terminated archive_audit. SEE ALSO sam-archiverd(1M), mcf(4)