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: Understanding Storage Media Concepts Understanding Storage Media Concepts
go to next page: Initializing VolumesInitializing Volumes
end of book navigation links

Allocating and Deallocating Drives  



This section explains how to allocate and deallocate drives. The only situation in which the ALLOCATE command is required, however, is when you must retain control of the same volume across dismounts. An example of this is when you alternate between mounting a tape using the /FOREIGN and /NOFOREIGN qualifiers.

Allocating Drives  

Use the DCL command ALLOCATE to logically assign a disk drive or a tape drive to your process. You might do this if you suspect an error and want to reserve a disk while you repair the error.

The ALLOCATE command allocates only one device to a process. To allocate several devices, you must use multiple commands.

How to Perform This Task

Enter the ALLOCATE command using the following format:ALLOCATE device-name[:] [logical-name]

where:

device-name
Specifies the drive on which the volume will be loaded. The device name can be a physical, generic, or logical name.
logical-name
Specifies an optional logical name to be associated with the specified disk or tape drive.

Examples

  1. $ ALLOCATE DUA2:
    %DCL-I-ALLOC, _MARS$DUA2: allocated
    In this example, the ALLOCATE command specifies a physical device named DUA2:, which requests the allocation of a specific RK10 disk drive; that is, unit 2 on controller A. The response from the ALLOCATE command indicates that the device was successfully allocated.
  2. $  ALLOCATE/GENERIC RA90 MYDISK
    This example shows how to use the /GENERIC qualifier with the ALLOCATE command to allocate a particular type of device. In this case, the system allocates the first available RA90 drive to your process.

For further discussion of the /GENERIC qualifier and other qualifiers that you can use with the ALLOCATE command, refer to the HP OpenVMS DCL Dictionary. The OpenVMS User's Manual contains additional examples of the ALLOCATE command.

Deallocating Drives  

Allocating a device reserves that device for exclusive use by your process. The device remains allocated to your process until you explicitly deallocate it or until you log out.

Logging out of a process from which drives have been allocated automatically deallocates all explicitly and implicitly allocated drives; therefore, explicitly deallocating a disk or a tape drive that has been allocated to your process is not necessary. HP, however, recommends that you use the DEALLOCATE command (or a command procedure containing this command) explicitly to deallocate all the drives you allocated with the ALLOCATE command.

How to Perform This Task

Use the DCL command DEALLOCATE to explicitly deallocate a disk drive or tape drive that has been allocated to your process. A complement to the ALLOCATE command, the DEALLOCATE command logically disconnects a drive from your process and returns it to the pool of devices.

Enter the DEALLOCATE command using the following format:DEALLOCATE device-name[:]

where:

device-name
Specifies the drive on which the volume will be loaded. The device name can be a physical, generic, or logical name.

Example

The following example shows how to explicitly deallocate a tape drive or a disk drive:

$ DEALLOCATE MUA1:
In this example, the DEALLOCATE command logically disconnects tape drive MUA1: from your process. The system returns you to DCL level.
go to previous page: Understanding Storage Media Concepts Understanding Storage Media Concepts
go to next page: Initializing VolumesInitializing Volumes