skip book previous and next navigation links
go up to top of book: HP OpenVMS System Manager's Manual, Volume 1:... HP OpenVMS System Manager's Manual, Volume 1:...
go to beginning of chapter: Managing Storage Media Managing Storage Media
go to previous page: Managing Disk Space Managing Disk Space
go to next page: Using Mount Verification for RecoveryUsing Mount Verification for Recovery
end of book navigation links

Using the Analyze/Disk_Structure Utility to Check and Repair Disks  



You can reclaim disk space by using the Analyze/Disk_Structure utility (ANALYZE/DISK_STRUCTURE) to identify and delete lost files and files marked for deletion. Use this utility on a regular basis to check disks for inconsistencies and errors, and to recover lost files.

This utility detects Files-11 Disk Structure (ODS) disk problems that have been caused by hardware errors, system errors, and user errors. ANALYZE/DISK_STRUCTURE performs the following tasks:

ANALYZE/DISK_STRUCTURE performs the verification of a volume or volume set in eight distinct stages. During these stages, the utility collects information used in reporting errors or performing repairs. However, the utility repairs volumes only when you specify the /REPAIR qualifier.

HP recommends that you execute ANALYZE/DISK_STRUCTURE in two passes:

  1. To report all errors
  2. With the /REPAIR and /CONFIRM qualifiers to repair selected errors

Directing ANALYZE/DISK_STRUCTURE Output

By default, ANALYZE/DISK_STRUCTURE directs all output to your terminal. By using the /LIST qualifier, however, you can create a file containing the following information about each file on the disk:

The following sections explain ways to use ANALYZE/DISK_STRUCTURE:

Task Section
To report errors (but not repair them)
Reporting Errors
To both report and repair errors
Reporting and Repairing Errors
To recover lost files
Recovering Lost Files
To create a disk usage file
Creating a Disk Usage File

The HP OpenVMS System Management Utilities Reference Manual contains additional information about this utility.

Reporting Errors  

By default, ANALYZE/DISK_STRUCTURE reports errors but does not make repairs. In this mode, ANALYZE/DISK_STRUCTURE runs through eight stages of data collection and then, by default, prints a list of all errors and lost files to your terminal.

One type of problem that ANALYZE/DISK_STRUCTURE locates is an invalid directory backlink. (A backlink is a pointer to the directory in which a file resides.) If your disk has a file with an invalid directory backlink, ANALYZE/DISK_STRUCTURE displays the following message and the file specification to which the error applies:

%VERIFY-I-BACKLINK, incorrect directory back link [SYSEXE]SYSBOOT.EXE;1
Enter the ANALYZE/DISK_STRUCTURE command using the following format:

How to Perform This Task

ANALYZE/DISK_STRUCTURE device-name:[/qualifier]

Example

The following command reports all disk structure errors on the DUA1: device:

$ ANALYZE/DISK_STRUCTURE DUA1:

Reporting and Repairing Errors  

To instruct ANALYZE/DISK_STRUCTURE to repair the errors that it detects, enter the /REPAIR qualifier using the following format:ANALYZE/DISK_STRUCTURE device-name/REPAIR

To select which errors ANALYZE/DISK_STRUCTURE repairs, enter both the /REPAIR and /CONFIRM qualifiers using the following format:ANALYZE/DISK_STRUCTURE device-name/REPAIR/CONFIRM

When you enter this command, ANALYZE/DISK_STRUCTURE displays a description of each error and prompts you for confirmation before making a repair.

Examples

  1. $ ANALYZE/DISK_STRUCTURE DUA1:/REPAIR
    In this example, the command reports and repairs all errors on the DUA1: device.
  2. $ ANALYZE/DISK_STRUCTURE DUA1:/REPAIR/CONFIRM
    The command in this example might produce the following messages and prompts:
    %VERIFY-I-BACKLINK, incorrect directory back link [SYS0]SYSMAINT.DIR;1
    Repair this error? (Y or N): Y
    %VERIFY-I-BACKLINK, incorrect directory back link [SYSEXE]SYSBOOT.EXE;1]
    Repair this error? (Y or N): N

For complete descriptions of all errors and recommended actions, refer to the OpenVMS Command Definition, Librarian, and Message Utilities Manual .

Recovering Lost Files  

A lost file is not linked to a directory. Under normal circumstances, files are not lost. However, files occasionally lose their directory links because of disk corruption, hardware problems, or user error.

For example, in cleaning up files and directories, you might inadvertently delete directories that still point to files. When you delete a directory file (a file with the file type .DIR) without first deleting its subordinate files, the files referred to by that directory become lost files. Though lost, these files remain on the disk and consume space.

Use ANALYZE/DISK_STRUCTURE periodically to check for disk structure errors such as lost files on the disk. When you run ANALYZE/DISK_STRUCTURE specifying the /REPAIR qualifier, the utility places lost files in disk:[SYSLOST] and issues a message about each file, shown in the example that follows. (Refer to the HP OpenVMS System Management Utilities Reference Manual for more information.)

Another opportunity to check for lost files on your system is during a backup operation. See Comparing Files for details.

Example

$ ANALYZE/DISK_STRUCTURE/REPAIR/CONFIRM DDA0:
The command in this example analyzes and repairs all errors and lost files on the DDA0: device.

If it discovers lost files on your disk, ANALYZE/DISK_STRUCTURE issues messages similar to the following:

%VERIFY-W-LOSTHEADER, file (16,1,1) []X.X;1
        not found in a directory
%VERIFY-W-LOSTHEADER, file (17,1,1) []Y.Y;1
        not found in a directory
%VERIFY-W-LOSTHEADER, file (18,1,1) []Z.Z;1
        not found in a directory
%VERIFY-W-LOSTHEADER, file (19,1,1) []X.X;2
        not found in a directory
%VERIFY-W-LOSTHEADER, file (20,1,1) []Y.Y;2
        not found in a directory
%VERIFY-W-LOSTHEADER, file (21,1,1) []Z.;1
        not found in a directory
%VERIFY-W-LOSTHEADER, file (22,1,1) []Z.;2
        not found in a directory
%VERIFY-W-LOSTHEADER, file (23,1,1) LOGIN.COM;163
        not found in a directory
%VERIFY-W-LOSTHEADER, file (24,1,1) MANYACL.COM;1
        not found in a directory
All lost files in this example are automatically moved to DDA0:[SYSLOST].

Renumbering of Files in the [SYSLOST] Directory

When a lost file is placed in the [SYSLOST] directory, ANALYZE/DISK/REPAIR might renumber that file so that it has a different version number than it had originally. The reason for the renumbering is that VERIFY does not know which directory a file has come from. For example, two files from different directories might have the same name. So that errors do not occur when entering files with the same name, type, and version, files are created with new or higher version numbers.Once files have been moved to [SYSLOST], the system manager (perhaps with users' help) needs to examine these files to decide on the appropriate action for each file. In most cases, the system manager moves the file to an appropriate directory or deletes the file.

Erasing Old Home Blocks  

When you initialize a volume, the initialize operation might not erase old home blocks. These are blocks that were created by previous initialize operations. If a volume that has old home blocks is damaged, you might not be able to recover the volume without erasing the blocks.

You can erase old home blocks manually by using the /HOMEBLOCKS qualifier on the ANALYZE/DISK_STRUCTURE command as follows:

$ ANALYZE/DISK_STRUCTURE/REPAIR/HOMEBLOCKS
Note that this operation can take up to 30 minutes to complete.

Creating a Disk Usage File  

You can create a disk usage file by using the /USAGE qualifier. The identification record in the file header contains a summary of disk and volume characteristics. Following the identification record is a series of summary records; one summary record is created for each file on the disk. A summary record contains the owner, size, and name of the file.

Example

$ ANALYZE/DISK_STRUCTURE/USAGE=[ACCOUNT]USAGE_DDA0.DAT DDA0:
In this example, the /USAGE qualifier creates a disk usage file, USAGE_DDA0.DAT, and places it in the [ACCOUNT] directory.
go to previous page: Managing Disk Space Managing Disk Space
go to next page: Using Mount Verification for RecoveryUsing Mount Verification for Recovery