[Digital logo]
[HR]

OpenVMS System Manager's Manual


Previous | Contents

Quotas are maintained and enforced on a per-volume basis. Each volume or volume set has its own quota file. A volume on which quotas are not maintained has no quota file. On a volume set, volume 1 contains the quota file.

With OPER privilege, you (or the user maintaining the volume) supply identifiers and assign quotas and overdrafts with the System Management utility (SYSMAN). (During normal file activities, the system automatically maintains usage counts.)

If users run out of disk space during the creation of a file, they receive a system message. If they cannot obtain sufficient space by purging or deleting unnecessary files, they might contact you to increase their disk quota. If they attempt to write a file to a spooled printer, they must have write access and have sufficient quota on the disk associated with that printer.

Disk Quota File

A quota file records all users who are allowed to use the disk, and shows their current disk usage and their maximum disk allocation. A quota file, QUOTA.SYS, which is stored in directory [000000] with other system files, requires one block of disk storage for every 16 entries.

A quota file has the following format:

   UIC (1)         Usage (2)       Permanent Quota (3)  Overdraft Limit (4)
[0,0]             0               333333              3333 
[TTD,DAVIS]       15590           333333              3333 
[TTD,MORGAN]      1929            333333              3333 
[MKT,MORSE]       7650            333333              3333 
. 
. 
. 
  1. User identification code (UIC) of each user entitled to maintain files on the volume. UIC [0,0] appears in all quota files; use it as a template to set default values for quotas and overdrafts.
  2. Number of disk blocks currently dedicated to a user's files. This number includes the blocks allocated (shown by the DCL command DIRECTORY /SIZE=ALL /BY_OWNER=uic), plus at least one block in the index file for every file owned by the user.
  3. Maximum number of blocks on the volume that a user's files can occupy. When the maximum number is exceeded, the system issues an error message when a file is created.
  4. Number of blocks by which a user can exceed the quota.

Each entry in a quota file includes the information shown in Table 8-16.

Table 8-16 Contents of a Quota File
Item Description
General Identifier or UIC Identification code of a user entitled to maintain files on the volume
Usage Number of blocks on the volume taken up by the user's files
Quota Maximum number of blocks on the volume that the user's files can take up before an error message is issued
Overdraft Number of blocks over the quota that the user's files can take up

The maximum number of blocks permitted to a user on a volume is the sum of the quota and the overdraft.

A quota file is initialized with an entry for UIC [0,0]. The usage count for this UIC should not change from 0; in other words, UIC [0,0] should own no files. Its quota and overdraft, however, serve as defaults in certain situations; set them to values most likely to be assigned to other UICs as quotas and overdrafts.

How Quotas Are Maintained

During normal use of a volume with a quota file, the system automatically updates the usage counts as users create, delete, extend, and truncate files. Users without entries in the quota file are not allowed to create files or allocate space on the volume unless they have the EXQUOTA privilege.

To create new files, a user must have disk space usage below quota (not overdraft). If adding a new file or expanding a current file exceeds a user's quota, the system prohibits the operation and issues an error message.

A user with an overdraft might be able to extend an open file after exceeding the disk quota (for example, during an editing session). A user can extend an open file until usage exceeds the sum of the quota and the overdraft. At this point, the system prohibits further extensions to the file.

Quota restrictions are not enforced for users with the EXQUOTA privilege; however, their usage counts are maintained.

How the Rebuild Operation Ensures Quota File Accuracy

When you mount a volume that was not properly dismounted the last time it was used, the system performs an automatic REBUILD operation. If quotas are enforced on the volume, this action ensures that the quota file accurately reflects usage of the disk, under any of the following conditions:

8.11.2 Establishing Disk Quotas

Disk quota operations are enabled by default. However, you can use SYSMAN DISKQUOTA commands to control disk usage. You can assign disk quotas to users and maintain an accurate record of disk use for ODS Level 2 disks. You create a quota file for each disk except the system disk. The quota file records the current usage and the maximum disk usage for all users.

SYSMAN allows you to access disks that are normally unavailable from your local node. With SYSMAN, you can obtain a display of all disks on the other nodes, including those that are mounted privately or used as system disks. You can run DISKQUOTA on any available disk without logging in to each node.

8.11.2.1 Creating a Quota File

The first step in allocating disk space is to create a quota file for each volume or each volume set. The absolute maximum number of blocks permitted a user on a volume is the sum of the quota and the overdraft. Only users with the EXQUOTA privilege can bypass disk quota restrictions.

How to Perform This Task

Creating a quota file requires SYSPRV, BYPASS, or GRPPRV privilege. To create a quota file on a disk, follow these steps using SYSMAN commands:

  1. Use the DISKQUOTA CREATE command and specify the target disk with the /DEVICE qualifier using the following format:
    DISKQUOTA CREATE/DEVICE=device-spec 
    
  2. Use the DISKQUOTA MODIFY command to adjust [0,0] to an appropriate value for the device using the following format:
    DISKQUOTA MODIFY/DEVICE=device-spec/PERMQUOTA=value 
    

    Note

    If you create a quota file or enable disk quotas on a disk that has files on it, use the DISKQUOTA REBUILD command to update the disk quota entries with the current usage information.

  3. Use the DISKQUOTA SHOW command to display the quota file using the following format:
    DISKQUOTA SHOW owner/DEVICE=device-spec 
    

Examples

8.11.2.2 Monitoring Disk Quotas

Use the commands shown in the following table to monitor the amount of disk space users consume:
Command Description
MOUNT/QUOTA Use to enforce quotas on a specified disk volume. You must have the VOLPRO user privilege, or your UIC must match the UIC written on the volume.
SHOW QUOTA Use to determine whether a quota exists for any specific user on a specific disk. The display that results from the SHOW QUOTA command gives the quotas used, authorized, and available.

Enter the DCL command SHOW QUOTA using the following format:

SHOW QUOTA/USER=uic (or identifier)
      

The results of the SHOW QUOTA command depend on whether you have read access to the quota file:

  • If you have read access, the command shows how much disk space any user on the system has been allocated.
  • If you do not have read access, the command shows your own allotment.

Examples

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

How to Perform This Task

To discontinue quota operations on a volume, follow these steps:

  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:

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

Examples

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 issue a command like the following one:

$ 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 on 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 On-Disk Structure (ODS) disk problems that have been caused by hardware errors, system errors, and user errors. ANALYZE/DISK_STRUCTURE does the following:

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.

Digital 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 issue this command, ANALYZE/DISK_STRUCTURE displays a description of each error and prompts you for confirmation before making a repair.

Examples

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. (See 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 occurs:

  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. 
    


Previous | Next | Contents | [Home] | [Comments] | [Ordering info] | [Help]

[HR]

  6017P025.HTM
  OSSG Documentation
  22-NOV-1996 14:21:52.81

Copyright © Digital Equipment Corporation 1996. All Rights Reserved.

Legal