|
|
|
|
Dismounting Volumes and Volume Sets
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 volumeThe 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:
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 lostYou 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.
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.$
DISMOUNT/NOUNLOAD MUA1:
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:
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.$
DISMOUNT DUA0:
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:
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.$
DISMOUNT/CLUSTER $10$DJA100:
For more information about the DISMOUNT command, refer to the HP OpenVMS DCL Dictionary.
|
|