Technical data

Managing Storage Media
9.9 Dismounting Volumes and Volume Sets
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:
Avoid write-locking a volume while it is mounted.
Do not remove a volume from a drive before it has been dismounted.
Do not halt the system without performing an orderly shutdown procedure
(see Section 4.8.1).
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 17.9.14.
2. Wait for:
a. All processes using those images to release the images.
b. 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 9.9.1
Dismount a volume set Section 9.9.2
Dismount foreign volumes Section 9.9.3
Dismount a volume in a cluster Section 9.9.4
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 DISMOUNT command.
9.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
958 Managing Storage Media