Technical data
Managing Storage Media
9.11 Managing Disk Space
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 11.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.
Managing Storage Media 9–69










