Document revision date: 19 July 1999
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

OpenVMS System Manager's Manual


Previous Contents Index

8.11.2.3 Suspending Quota Operations

The SYSMAN command DISKQUOTA DISABLE (which requires SYSPRV privilege, a system UIC, or ownership of the volume), suspends quota operations on a volume in the current management environment; the DISKQUOTA ENABLE command lifts the suspension. You can also suspend quota operations on a volume at mount time by specifying the /NOQUOTA qualifier with the DCL command MOUNT. Disabling quotas requires privileges.

Whenever quotas are enabled on a volume---either implicitly with the MOUNT command or explicitly with the DISKQUOTA ENABLE command---you must update disk quota information using the command DISKQUOTA REBUILD. In updating the quota file, the system adds new UICs and corrects usage counts for each user. (Refer to the OpenVMS System Management Utilities Reference Manual for more information.)

How to Perform This Task

To discontinue quota operations on a volume:

  1. Log in to SYSMAN.
  2. Use the following format to execute the DISKQUOTA DISABLE command on each member of the cluster that is mounting the volume:

    SYSMAN> DISKQUOTA DISABLE 
    

  3. Exit from SYSMAN.
  4. Delete the QUOTA.SYS file in the top-level directory disk: [000000].

Note that the system does not suspend quotas across disk mounts if the QUOTA.SYS file is still present.

8.11.3 Purging Files

One of the best ways to conserve disk space is to purge the following items:

Encourage individual users to purge files in their own areas and directories. If necessary, you can purge files from some or all directories. The following examples show purge commands.

Examples


  1. $ PURGE/LOG $DISK1:[JONES...]
    

    The command in this example purges all files in the directory [JONES] and all the subdirectories below [JONES] on the $DISK1: device. It logs the files that are deleted (displaying their names on the terminal as they are deleted).


  2. $ PURGE/KEEP=3 $DISK1:[*...]
    

    This example uses wildcard characters to perform global purges and uses the /KEEP qualifier to retain only three versions of each file.

8.11.4 Setting Version Limits on Files

Another way to conserve disk space is to limit the number of file versions that users can create in a directory by using the /VERSION_LIMIT qualifier with the SET DIRECTORY or CREATE DIRECTORY command using the following format:

SET DIRECTORY/VERSION_LIMIT=n 

Example


$ CREATE/DIRECTORY $DISK1:[JONES]/OWNER_UIC=[200,1]/VERSION_LIMIT=3

In the example, files in account [JONES] cannot exceed three versions. If a user in this directory attempts to exceed the three-version limit, the system purges the file, leaving only the three most recent versions.

Note

Be careful about setting a version limit on the master file directory (MFD). Because the system uses the version limit that you set on the MFD on any directory you create beneath the MFD, users might inadvertently lose important data.

8.11.5 Setting File Expiration Dates

Files--11 uses the expiration date of each file to track the use of the file. The expiration dates aid the disposal of seldom-used files when you use the DCL command BACKUP/DELETE.

File expiration is a file system feature that is available only on Files-11 Structure Level 2 disks.

After you set an expiration date on a volume, the retention periods operate as follows:

The expiration date of a frequently accessed file fluctuates between the minimum and maximum period plus the current date. When you set a suitable interval between minimum and maximum retention periods, you can balance between accuracy and efficiency in maintaining expiration dates. Be careful about setting expiration dates; either be very specific, or set the expiration date in the simplest way.

Certain commands and utilities, such as the DIRECTORY command and the Backup utility, can selectively operate on files that are expired. For example, you can enter a command like the following:


$ BACKUP/DELETE PUBLIC:[*...]/BEFORE=TODAY/EXPIRED  MUA0:ARCH20JUN

In this example, the BACKUP command copies to tape and then deletes all expired files. Users might not be aware of file expiration dates, so retain the tape for a substantial period of time.

For more information about the Backup utility, see Section 10.13.2.

How to Perform This Task

To enable the setting of expiration dates, enter the DCL command SET VOLUME in the following format:

SET VOLUME device-name[:][,...]/RETENTION=(min,max) 

where min and max specify the minimum and maximum retention periods for files on the volume, expressed as delta time values.

If you specify only a single value in the SET VOLUME/RETENTION command, the system uses the value of the minimum retention period; then the maximum retention period is set to twice the minimum or the minimum plus 7 days, whichever is less. For example, you might set the retention period as follows:


$ SET VOLUME PAYVOL1:/RETENTION=(3)

The system uses 3 as the minimum retention period. Twice the minimum is 6 days; the minimum plus 7 is 10. Because the system uses the smaller of the two numbers, the retention period is set to 6.

You can simulate the maintenance of "access dates," which are available in some other operating systems, by setting the retention periods to very small values (for example, 1 hour). Note, however, that doing so substantially increases overhead in the file system.

This feature does not automatically remove unused files; instead, it maintains expiration dates to permit you to develop your own policy for handling files with little or no activity.

Note

If you start maintaining expiration dates on a previously existing volume, be aware that the expiration dates on existing files are 0 until the files are accessed. Files with expiration dates of 0 are considered expired.

Refer to the OpenVMS DCL Dictionary for details on the parameters and qualifiers of the SET VOLUME command.

Example


$ SET VOLUME DUA0:/RETENTION=(15-0:0,20-0:0)

In this example, the command sets the minimum retention period to 15 days and the maximum to 20 days.

8.12 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.

Compaq 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) Section 8.12.1
To both report and repair errors Section 8.12.2
To recover lost files Section 8.12.3
To create a disk usage file Section 8.12.5

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

8.12.1 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 

How to Perform This Task

Enter the ANALYZE/DISK_STRUCTURE command using the following format:

ANALYZE/DISK_STRUCTURE device-name:[/qualifier] 

Example

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


$ ANALYZE/DISK_STRUCTURE DUA1:

8.12.2 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.

8.12.3 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 OpenVMS System Management Utilities Reference Manual for more information.)

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].

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

8.12.4 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.

8.12.5 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.

8.13 Using Mount Verification for Recovery

Mount verification is a recovery mechanism for disk and tape operations. If a device goes off line or is write-locked while mount verification is enabled, you can correct the problem and continue the operation.

Without mount verification, a write lock or offline error causes a volume to be dismounted immediately. All outstanding I/O to the volume is canceled, and all open files on the volume are closed. Any data not yet written to the volume is lost.

8.13.1 Understanding Mount Verification

When the system or a user attempts to access a device after it has gone off line, mount verification is initiated. Usually a device goes off line as the result of a hardware or user error. Once a device is off line, the hardware (and for some disks, the software) marks the disk or tape as "invalid," and I/O requests for that device fail.

As long as mount verification is enabled, the following operations occur:

  1. The software marks the volume to indicate that it is undergoing mount verification.
  2. The software stalls all I/O operations to the disk or tape until the problem is corrected.
  3. The operator communication manager (OPCOM) issues a message to operators enabled for DISKS and DEVICES or TAPES and DEVICES. The message announces the unavailability of the disk or tape in the following format:


    %%%%%%%%%%% OPCOM, <dd-mmm-yyyy hh:mm:ss.cc> %%%%%%%%%%% 
    Device <device-name> is offline.               
    Mount verification in progress. 
    

When a device goes off line or is write-locked, mount verification sends two messages:

The second message is a form of insurance in cases in which OPCOM is unavailable. For example, if the system disk undergoes mount verification or if OPCOM is not present on a system, you at least receive the messages with the %SYSTEM-I-MOUNTVER prefix. Under normal circumstances, the operator terminal receives both messages, with the %SYSTEM-I-MOUNTVER message arriving first.

These messages notify you of the problem, and allow you to correct the problem and recover the operation. When a pending mount verification is canceled by timing out, OPCOM prints a message in the following format:


%%%%%%%%%%% OPCOM, <dd-mmm-yyyy hh:mm:ss.cc> %%%%%%%%%%% 
Mount verification aborted for device <device-name>. 

After a mount verification times out, all pending and future I/O requests to the volume fail. You must dismount and remount the disk before users can access it again.

Note

Mount verification caused by a write-lock error does not time out.

Mount Verification and Write-Locking

Suppose, for example, that a volume is mounted on a drive with write-lock off, and someone toggles the WRITE LOCK switch. If mount verification is enabled for the volume, the volume enters mount verification, and all I/O operations to the volume are suspended until you recover the operation, as explained in Section 8.13.2.4.

At mount time, if the system detects that the caches were not written back the last time the volume was used, the system automatically rebuilds the file information by scanning the contents of the volume. However, files being written at the time of the improper dismount might be partially or entirely lost. See Section 8.12 for details about analyzing and repairing these problems.

With the mount verification feature of disk and tape handling, users are generally unaware that a mounted disk or tape has gone off line and returned on line, or in some other way has become unreachable and then restored.


Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
6017PRO_037.HTML