skip book previous and next navigation links
go up to top of book: HP OpenVMS System Manager's Manual, Volume 1:... HP OpenVMS System Manager's Manual, Volume 1:...
go to beginning of chapter: Managing Storage Media Managing Storage Media
go to previous page: Mounting Tape Volume Sets Mounting Tape Volume Sets
go to next page: Using Command Procedures for Media SetupUsing Command Procedures for Media Setup
end of book navigation links

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 one, 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 HP OpenVMS System Manager's Manual, Volume 2: Tuning, Monitoring, and Complex Systems.
  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
Dismounting a Single Volume
Dismount a volume set
Dismounting a Volume Set
Dismount foreign volumes
Dismounting Foreign Volumes
Dismount a volume in a cluster
Dismounting a Volume in an OpenVMS Cluster System

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.

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.

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.

Using DISMOUNT Command Qualifiers  

The following table explains 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.

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:

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.

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 about the DISMOUNT command, refer to the HP OpenVMS DCL Dictionary.


go to previous page: Mounting Tape Volume Sets Mounting Tape Volume Sets
go to next page: Using Command Procedures for Media SetupUsing Command Procedures for Media Setup