Technical data

Managing Storage Media
9.9 Dismounting Volumes and Volume Sets
9.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 about the DISMOUNT command, refer to the OpenVMS
DCL Dictionary.
9.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, refer to the OpenVMS Users 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.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 9.10.2) takes advantage of some of these options.
960 Managing Storage Media