[Digital logo]
[HR]

OpenVMS System Manager's Manual


Previous | Contents

Allocating a drive for each volume in the volume set is not necessary. The tape file system requests that volumes be switched to appropriate drives when continuation volumes are required.

The operating system stores, but cannot verify, the identifiers of volumes you specify but do not physically mount on drives at mount time. The system later verifies the volume identifiers when the volumes are accessed.

The operating system supports the continuous processing of mounted volumes in a tape volume set through automatic volume switching and automatic volume labeling (AVL).

8.8.2.1 Creating Labels

Depending on the following conditions, the file system does or does not create a label:

Before processing continuation volumes, the tape file system processes the protection on that volume (as described in Section 8.4.2). If the file system determines that the user does not have access to the volume, it sends a message to the operator.

The label fills the six-character volume identifier field:

Note that the system can generate only 99 unique labels for a given volume set.

With automatic volume switching enabled, the operator can load a tape on the next drive allocated to the tape volume set anytime before the volume being processed reaches the EOT mark. The tape file system mounts and initializes (if INITIALIZE was specified originally) the next tape in the volume set and then notifies the operator that the switch has occurred.

8.8.2.2 Enabling Automatic Volume Switching

To use automatic volume switching, you must allocate more than one tape drive to your volume set. After you do so, the tape file system switches volumes for you automatically by selecting the next tape drive allocated to the volume set. The tape file system expects you to load the next volume in the volume set on that drive.

Examples

8.8.2.3 Disabling Automatic Switching

If your site prelabels volumes, you must disable automatic volume switching to avoid overwriting these labels. To explicitly override automatic volume switching, specify the /NOAUTOMATIC qualifier when mounting a tape volume. (The default is /AUTOMATIC.) Note that if you allocate only one drive to the tape volume set, automatic volume switching is implicitly disabled.

When a user is reading or writing to a magnetic tape and the tape reaches end-of-tape position, the system suspends processing and sends a request to mount the next tape in the volume set. For example:

%%%%%%%%%%%  OPCOM, 28-MAY-1996 15:23:31.78  %%%%%%%%%%%
request 3, from user PLAW
MOUNT new relative volume 2 (DW0QT2) on MUA1:

The user does not see this message and might not realize that another tape is needed to complete the read or write operation.

Example

$ MOUNT/NOAUTOMATIC MUA0: ABCD,EFGH

The command in this example tells MOUNT not to supply its own label for the second volume but, instead, to use the ones specified in the MOUNT command.

8.8.2.4 Sending Messages Back to Users

After loading the continuation volume on the drive specified in the mount request, mount the volume by entering the REPLY command with one of the three qualifiers shown in Table 8-15. For more information about these qualifiers, refer to the OpenVMS DCL Dictionary.

Table 8-15 REPLY Command Qualifiers for Continuation Volumes
Qualifier Description
/BLANK_TAPE=
identification-number
Use with an unformatted volume for write operations. This qualifier initializes the volume and requires the VOLPRO and OPER privileges to avoid a runaway tape or timeout condition. Either of the following REPLY commands is valid:
$ REPLY/BLANK_TAPE=3
      
$ REPLY/BLANK_TAPE=3 "DW0QT2"

The first command does not specify a volume identifier; the second does.

/INITIALIZE_TAPE=
identification-number
Use with a formatted volume for write operations if the volume identifier on the continuation volume does not match the one specified in the mount request. The file system reinitializes the tape and mounts the volume with the new volume identifier. The tape file system then performs access checks and initializes the volume as if the INITIALIZE command had been specified. Any data on the tape prior to specifying the /INITIALIZE_TAPE qualifier is lost. The current terminal must be enabled as an operator terminal for TAPES.

Either of the following commands is valid:

$ REPLY/INITIALIZE_TAPE=3
      
$ REPLY/INITIALIZE_TAPE=3 "DW0QT2"

The first command does not specify a volume identifier; the second does.

/TO= identification-number Use with a formatted volume for both read and write operations. During a write operation, use the /TO qualifier if you want the volume identifier that is specified in the mount request to be written on the continuation volume.

For example, to respond to the mount request 3, mount volume DW0QT2 on drive MTA1: and enter one of the following commands:

$ REPLY/TO=3
      
$ REPLY/TO=3 "DW0QT2"

The first command does not specify a volume identifier; the second does.

Specifying the Volume Identifier with the MOUNT Command

Specifying the volume identifier in the MOUNT command is essential during write operations because it ensures that the correct volume is mounted on the drive and links the continuation volume to the volume set.

Omitting the Volume Identifier with the REPLY/TO Command

To preserve the accessibility character on a volume, you must omit the volume identifier with the REPLY/TO command during a write operation. (When you read from tape, the volume identifier is optional.)

If you initialize and mount a volume set in which each volume has a unique accessibility character that you want to maintain, avoid using the volume identifier because it causes the accessibility character of the first volume in the set to overwrite the accessibility character on the continuation volume.

For example, to preserve the accessibility character, enter the following command in which 3 is the request identification number:

$ REPLY/TO=3

Once the tape file system receives the REPLY command, the system performs checks on the continuation volume to ensure that the volume is the correct one. If it is the correct volume with proper access codes, the system mounts the volume and reissues pending read or write requests to the continuation volume. If the volume fails any of these access checks, the system does not mount the volume (or initialize and mount it in the case of a blank tape).

8.8.3 Modifying Magnetic Tape Characteristics

Use the DCL command SET MAGTAPE to define the default characteristics associated with a specific tape device for subsequent file operations. Use the following format:

SET MAGTAPE device-name 

where:
device-name Specifies the name of the tape device for which the characteristics are to be set. The device must not be currently allocated to any other user.

The following examples illustrate uses of the SET MAGTAPE command in conjunction with the MOUNT command.

Examples

8.9 Dismounting Volumes and Volume Sets

When you finish processing the files or data on a disk or tape volume, use the DISMOUNT command to explicitly dismount a single volume or an entire volume set.

Use the following format when you enter the DISMOUNT command:

DISMOUNT device-name 

where:
device-name Name of the device containing the volume---either a logical name or a physical name. If you specify a physical name, the controller defaults to A and the unit defaults to 0.

If the volume currently mounted on the device is a member of a disk or tape volume set, all volumes in the set are dismounted unless you specify the /UNIT qualifier.

You can dismount a volume on a local node or on all the nodes throughout a cluster.

Before dismounting a volume or volume set, the DISMOUNT command checks for conditions that prevent the dismount from completing:

If none of these conditions is found, the volume is marked for dismount. If any of these conditions exists, the DISMOUNT command does not mark the volume for dismount but, instead, displays error messages indicating the conditions that exist, the number of instances of each condition, and the fact that the volume cannot be dismounted.

If you attempt to dismount the system disk after it has been mounted shared, you may see a message such as the following, even if there are no user files open:

%DISM-W-CANNOTDMT, AXP27$DKA300: cannot be dismounted 
%DISM-W-USERFILES, 1 user file open on volume 
The message occurs because the file DISMOUNT.EXE is opened as a user file in the course of the dismount operation. To eliminate the error message, install the file DISMOUNT.EXE.

In some cases, you might want to mark a volume for dismount even though files are open on the volume. Marking the volume for dismount prevents users from opening any new files, thereby allowing activity to wind down. You can use the qualifier /OVERRIDE=CHECKS to mark the volume for dismount even if files are open.

Dismounting with Cached Information

As a performance enhancement, the system stores volume information in memory, including information about free space on a disk volume, file identifications, quota file entries, and file headers. This storing of information is called caching. Cached information can include blocks allocated but not yet in a file, or files created but not yet in a directory.

The system writes the information in the caches to the disk when you dismount the disk or shut down the system. If you remove a disk from a drive before the caches are written to disk, the information in the caches is lost. Therefore, you must follow these guidelines:

You cannot dismount a volume if any known file lists associated with the volume contain entries. If a volume is referenced in a known file list, you must complete the following steps before you can dismount the volume:

  1. Delete all known images associated with the volume using the Install utility DELETE command. For more information, see Section 16.9.14.
  2. Wait for:
    1. All processes using those images to release the images.
    2. The system to write writable images back to their files.
      Use the DCL command SHOW DEVICES/FILES to determine the status of the files.

The following sections explain how to perform these tasks:
Task Section
Dismount a single volume Section 8.9.1
Dismount a volume set Section 8.9.2
Dismount foreign volumes Section 8.9.3
Dismount a volume in a cluster Section 8.9.4

8.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 DISMOUNT command.

8.9.1.1 Dismounting Before Unloading a Volume

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:

%MTACP-magnetic tape position lost 

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.

8.9.1.2 Dismounting Allocated Devices

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.

8.9.1.3 Using DISMOUNT Command Qualifiers

Following are explanations of the /UNIT and /NOUNLOAD qualifiers.
Qualifier Description
/UNIT Explicitly dismounts a single volume in the volume set without dismounting the entire set. (By default, the system dismounts all the volumes in the set when you explicitly dismount a single volume in a volume set.)

Using this qualifier dismounts a volume but does not "unbind" the volume from the volume set; if you remount the volume, it becomes part of the volume set again.

/NOUNLOAD Overrides the default automatic unloading of your volume from the drive. With this qualifier, your volume is logically dismounted from the drive; however, the volume remains physically loaded on the drive.

If you use this qualifier to dismount a tape volume, the volume remains loaded on the tape drive and the tape reel is rewound to the BOT mark.

Using this qualifier can save time and eliminate unnecessary handling of a volume if you plan to remount or reinitialize a volume you are dismounting.

Example

The following example shows how to use the DISMOUNT command. The example uses the /NOUNLOAD qualifier.

$ DISMOUNT/NOUNLOAD MUA1:

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.

8.9.2 Dismounting a Volume Set

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:

$ DISMOUNT DUA3:

8.9.3 Dismounting Foreign Volumes

You also use the DISMOUNT command to dismount foreign volumes. The following command dismounts a volume that has been mounted with the /FOREIGN qualifier on the DUA0: device:

$ DISMOUNT DUA0:

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.

8.9.4 Dismounting a Volume in an OpenVMS Cluster System

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:

$ DISMOUNT/CLUSTER $10$DJA100:

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 on the DISMOUNT command, see the OpenVMS DCL Dictionary.

8.10 Using Command Procedures for Media Setup

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, see 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.

8.10.1 Sample Command Procedure for Setting Up Disk Volumes

The command procedure in this section allocates, initializes, and mounts a disk volume. Follow these steps:

  1. Use a text editor to create a file named SETUP.COM.
  2. Enter the following command procedure, which, when executed, allocates and mounts a disk:
    $ ! Place a disk in the drive 
    $ IF P1 .EQS. "" THEN INQUIRE P1 "enter device name" 
    $ IF P2 .EQS. "" THEN INQUIRE P2 "enter volume label" 
    $ IF P3 .EQS. "" THEN INQUIRE P3 "enter logical name" 
    $ ALLOCATE 'P1' 
    $ MOUNT 'P1' 'P2' 'P3' 
    

    This command procedure, although very simple, accomplishes the task of allocating and mounting a disk each time you execute it. It prompts you for the device name, volume label, and logical name of the disk device that you want to allocate and mount. By assigning logical names to your disks, you can use this command procedure to allocate and mount devices repeatedly.
    You can take further advantage of the power of a command procedure by including a few additional tasks as well. For example, you might design the SETUP.COM command procedure to deallocate and dismount the disk. The command procedure example used to set up a magnetic tape (described in Section 8.10.2) takes advantage of some of these options.
  3. To execute the SETUP.COM command procedure, enter the following command:
    $ @SETUP
    

8.10.2 Sample Command Procedure for Setting Up Tape Volumes

The command procedure in this section, 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 Example 8-1.

Example 8-1 Command Procedure to Set Up Tape Volumes


$ ! First mount the tape on the drive 
$ ON CONTROL_Y THEN GOTO EXIT 
$ ON ERROR THEN GOTO EXIT 
$ WRITE SYS$OUTPUT "Welcome to FETCH." 
$ WRITE SYS$OUTPUT " " 
$ L1:  INQUIRE/NOPUNC PHYS "Have you placed the volume in the drive? " 
$ IF .NOT. PHYS THEN GOTO L1 
$ INQUIRE/NOPUNC DRIVE "Which drive is the volume mounted on? " 
$ DRIVE = DRIVE - ":" 
$ ALLOCATE 'DRIVE' 
$ MOUNT/FOREIGN 'DRIVE' 
$ ON ERROR THEN GOTO COMMAND_LOOP 
$ ! 
$ COMMAND_LOOP:  INQUIRE/NOPUNC OPTION "FETCH> " 
$ IF OPTION .EQS. "DIR" THEN GOTO DIR 
$ IF OPTION .EQS. "EXIT" THEN GOTO EXIT 
$ IF OPTION .EQS. "FETCH" THEN GOTO FETCH 
$ IF OPTION .EQS. "HELP" THEN GOTO HELP 
$ IF OPTION .EQS. "LIST" THEN GOTO LIST 
$ GOTO COMMAND_LOOP 
$ ! 
$ DIR:  INQUIRE SPEC "Filespec" 
$ DIR 'SPEC' 
$ GOTO COMMAND_LOOP 
$ HELP: 
$ WRITE SYS$OUTPUT "Enter any of the following commands at the prompt:" 
$ WRITE SYS$OUTPUT " " 
$ WRITE SYS$OUTPUT " " 
$ WRITE SYS$OUTPUT "DIR         (To search for a file)" 
$ WRITE SYS$OUTPUT " " 
$ WRITE SYS$OUTPUT "EXIT        (To exit this program)" 
$ WRITE SYS$OUTPUT " " 
$ WRITE SYS$OUTPUT "FETCH       (To perform a BACKUP RESTORE operation)" 
$ WRITE SYS$OUTPUT " " 
$ WRITE SYS$OUTPUT "HELP        (To read this text)" 
$ WRITE SYS$OUTPUT " " 
$ WRITE SYS$OUTPUT "LIST        (To perform a BACKUP LIST operation)" 
$ GOTO COMMAND_LOOP 
$ ! 
$ FETCH:  INQUIRE FILE "Filespec" 
$ INQUIRE SAVESET "Save set name" 
$ LINE := BACKUP/LOG 'DRIVE':'SAVESET'/SELECT='FILE' 
$ INQUIRE EXCLUDE "Enter any filespecs you want excluded" 
$ IF EXCLUDE .EQS. "" THEN GOTO L2 
$ LINE := 'LINE'/EXCLUDE=('EXCLUDE') 
$ ! 
$ L2:  INQUIRE/NOPUNC TO "Where do you want the file(s)? ([RET] for current directory)" 
$ IF TO .EQS. "" THEN GOTO REPLACE 
$ LINE := 'LINE' 'TO' 
$ GOTO L3 
$ REPLACE:  LINE := 'LINE' [] 
$ ! 
$ L3:  INQUIRE/NOPUNC NEW "Create a new version if file already exists? " 
$ IF .NOT. NEW THEN GOTO NOT 
$ LINE := 'LINE'/NEW_VERSION 
$ ! 
$ NOT:  LINE := 'LINE'/OWNER_UIC=ORIGINAL 
$ LINE 
$ GOTO COMMAND_LOOP 
$ ! 
$ LIST:  INQUIRE SPEC "Filespec" 
$ INQUIRE SAVESET "Save set name" 
$ INQUIRE/NOPUNC OUTPUT "What do you want to call the list file? ([RET] for SYS$OUTPUT )" 
 
$ IF OUTPUT .EQS. "" THEN GOTO NOOUT 
$ LINE := BACKUP/LIST='OUTPUT' 'DRIVE':'SAVESET'/SELECT=('SPEC') 
$ GOTO L4 
$ NOOUT:  LINE := BACKUP/LIST 'DRIVE':'SAVESET'/SELECT=('SPEC') 
$ ! 
$ L4:  INQUIRE EXCLUDE "Enter any filespecs you want excluded" 
$ IF EXCLUDE .EQS. "" THEN GOT L5 
$ LINE := 'LINE'/EXCLUDE=('EXCLUDE') 
$ ! 
$ L5:  LINE 
$ GOTO COMMAND_LOOP 
$ ! 
$ EXIT: 
$ DISMOUNT 'DRIVE' 
$ DEALLOCATE 'DRIVE' 

Assuming this command procedure is in a file named FETCH.COM, execute the command procedure by entering the following command:

$ @FETCH

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

8.11 Managing Disk Space

Disk space available for files is finite. You share responsibility with your users for making the best use of disk space.

The following sections explain disk quotas and describe some methods you can use to conserve and monitor disk space:
Method Section
Establish disk quotas Section 8.11.2
Purge files Section 8.11.3
Set version limits on files Section 8.11.4
Set file expiration dates Section 8.11.5
Analyze and repair error conditions Section 8.12

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


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

[HR]

  6017P024.HTM
  OSSG Documentation
  22-NOV-1996 14:21:51.35

Copyright © Digital Equipment Corporation 1996. All Rights Reserved.

Legal