HP OpenVMS Systems Documentation
OpenVMS System Manager's Manual
9.9.1 Dismounting a Single Volume
This section explains procedures to follow in dismounting a single
volume and also describes some of the qualifiers you can use with the
Always explicitly dismount a volume or volume set with the DISMOUNT command, or with a command procedure containing that command, before physically unloading that volume. Always wait for the drive to unload before you remove the volume. (You can verify that the dismount is complete by entering the DCL command SHOW DEVICES.)
A private volume is dismounted and unloaded automatically if you log out of the job from which you mounted the volume. If the system fails, however, the drive is not automatically dismounted.
Note that data loss can occur if you do not explicitly dismount a volume and the system fails. For tape volumes, data loss can occur if you unload a volume that contains an open file for which file-trailer labels have not been written. When you remount the volume and attempt to access the file without file-trailer labels, you receive the following error message:
You can access all the files that precede the file whose file-trailer
labels have not been written. However, you cannot access the file that
does not have file-trailer labels.
If the device you are dismounting was allocated with an ALLOCATE
command, it remains allocated after you dismount it with the DISMOUNT
command. If the device was implicitly allocated with the MOUNT command,
the DISMOUNT command deallocates it.
The following table explains the /UNIT and /NOUNLOAD qualifiers.
The following example shows how to use the DISMOUNT command. The example uses the /NOUNLOAD qualifier.
In this example, the tape volume is logically dismounted and remains
loaded on the MUA1: device. Also, the tape reel is rewound to the
beginning-of-tape mark. The operating system returns you to DCL level.
Use the DISMOUNT command to dismount an entire volume set. If you explicitly dismount any volume in a disk or tape volume set, the entire volume set is dismounted. For example, if you have a volume set that consists of DUA3: and DUA4: and you enter the following command, the entire volume set is dismounted:
9.9.3 Dismounting Foreign Volumes
In this example, the volume that had been mounted with the /FOREIGN
qualifier on DUA0: is dismounted and automatically unloaded. The system
returns you to DCL level.
You can use the DISMOUNT command to dismount a volume throughout an OpenVMS Cluster system by using the /CLUSTER qualifier. The following command, which requires SYSNAM privilege, dismounts a volume in an OpenVMS Cluster system:
The DISMOUNT/CLUSTER command first checks for conditions that prevent the volume from dismounting on the local node. If none is found, the command then checks for such conditions on all the other nodes. If a condition is found on any node, the command sends error messages identifying the device, the node on which the error occurred, and the error.
For more information about the DISMOUNT command, refer to the
OpenVMS DCL Dictionary.
Many of the operations that you perform on disk and tape media are routine. It is worthwhile to identify those routine tasks and design command procedures to assist you in performing them. To become familiar with the syntax used to design and execute command procedures, refer to the OpenVMS User's Manual.
You might, for example, want to design command procedures to set up
private disk and tape volumes. The command procedure examples in this
section, although general in nature, can serve as guiding strategies
for you. You can tailor these command procedures to meet the needs of
your own setup tasks.
9.10.2 Sample Command Procedure for Setting Up Tape Volumes
The command procedure shown in Example 9-1, which is more complex and detailed than the previous example, is designed to set up a magnetic tape for processing. The ALLOCATE and MOUNT/FOREIGN commands are included in this command procedure. Using a text editor, construct the command procedure as shown in the example.
Assuming this command procedure is in a file named FETCH.COM, execute the command procedure by entering the following command:
In addition to allocating and mounting functions, as in the previous
example, FETCH.COM prompts you for input. For example, it specifically
asks you if the tape is on the drive. Also note that FETCH.COM does a
BACKUP restore operation. It prompts you for specific options on the
restore operation. Finally, FETCH.COM explicitly dismounts your
magnetic tape volume and deallocates the drive after your task
Disk space available for files is finite. You share responsibility with your users for making the best use of disk space.
9.11.1 Understanding Disk Quotas
A disk quota is a method for maintaining and enforcing limits on the amount of disk space available to users on a public volume. You limit the amount of space available to individual users on public volumes (or volume sets) by creating and maintaining a quota file on each volume. Individual users can similarly restrict usage on private volumes.
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.
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  with other system files, requires one block of disk storage for every 16 entries.
A quota file has the following format:
Each entry in a quota file includes the information shown in Table 9-17.
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.
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.
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:
9.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 or 5 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.
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.