HP OpenVMS Systems Documentation

Content starts here

OpenVMS System Manager's Manual


Previous Contents Index

9.3 Initializing Volumes

You initialize a disk or tape volume for one or both of the following reasons:

  • To delete all old information from the volume.
  • To give the volume a structure that is recognized by the operating system.
    This structure prepares a volume to receive data and stores it so that the operating system can locate it easily.

Before you or any user can write files or data to a disk or a tape volume, you must initialize a volume.

Caution

Initializing a disk volume removes links to existing files on the volume, which, in effect, deletes (but does not erase) the files. To erase the data in a file, use the INITIALIZE/ERASE command.

Do not initialize a volume that contains data that users want to keep. (Initializing a volume each time you use it is not necessary.)

Steps for Setting Up Disk or Tape Volumes

To set up a disk or tape volume, you need to perform two steps. In each step you enter a DCL command, as follows:

1. INITIALIZE Formats the volume and writes an identifying label on it. This effectively removes the previous contents of the volume. (Initializing a volume each time you use it is not necessary.)
2. MOUNT Provides the user's process with access to a volume's files or data.

This section contains instructions for initializing volumes. Section 9.5 contains instructions for mounting volumes. Before you initialize a volume, you might want to refer to Section 9.4, which contains information about volume protection.

Setting Up Media on a Workstation

For workstations with removable media, users can perform the tasks shown in Table 9-7 unassisted.

Table 9-7 Tasks Users Can Perform Unassisted
Task Description
Load Insert the media into the drive.
Initialize Remove all previous contents from the media. (VOLPRO privilege is required for most operations.)
Mount Logically mount the media and allocate the device (requires SYSNAM, GRPNAM, or VOLPRO privilege for various operations). To mount a volume on a device, you must have read (R), write (W), or control (C) access to that device.
Perform file operations Access files and perform the desired operations on them.
Dismount Logically dismount the media and deallocate the device (requires GRPNAM and SYSNAM user privileges to dismount group and system volumes).
Unload Remove the media from the drive compartment.

For additional information about manipulating removable media on your workstation, refer to the hardware manuals that accompany your workstation.

On VAX systems, also refer to the upgrade and installation supplement for your computer.

9.3.1 Using the INITIALIZE Command

Use the DCL command INITIALIZE to format and write a label to the volume. To initialize a disk or tape volume, enter the INITIALIZE command using the following format:


INITIALIZE device-name[:] volume-label

where:

device-name Specifies the name of the device on which the volume is to be physically mounted and then initialized. To prevent initializing another user's volume, allocate a device before you initialize the volume. (Prior allocation is not required, however.)
volume-label Specifies the identification to be encoded on the volume. For a disk volume, you can specify a maximum of 12 ANSI characters; for a magnetic tape volume, you can specify a maxiumum of 6 alphanumeric characters.

To initialize a public volume, you must specify the /SYSTEM qualifier with the DCL command INITIALIZE:


INITIALIZE/SYSTEM device name[:] volume-label

For more details on INITIALIZE command format, refer to the OpenVMS DCL Dictionary.

Examples


  1. $ INITIALIZE DUA2: TEMP
    

    The command in this example initializes the disk volume DUA2: and labels the volume TEMP.

  2. $ INITIALIZE MUB2: TEST
    

    The command in this example initializes the tape volume on MUB2: and labels the volume TEST.

The OpenVMS User's Manual contains additional examples of the INITIALIZE command.

9.3.2 Using INITIALIZE Command Qualifiers

Table 9-8 describes a number of qualifiers you can use with the INITIALIZE command. Selecting appropriate values for these qualifiers and selecting the appropriate position for the index file involve tradeoffs. The OpenVMS DCL Dictionary contains more information about each qualifier.

Table 9-8 INITIALIZE Command Qualifiers
Qualifier Description
/CLUSTER_SIZE=
number-of-blocks
Specifies minimum allocation unit in blocks.
/HEADERS=
number-of-headers
Specifies the number of file entries, called file headers, that you expect to have in INDEXF.SYS, the index file. It controls how much space is initially allocated to INDEXF.SYS for headers. (The system accesses the index file each time it locates a file on disk.)

Each file on a disk requires at least 1 file header and each header occupies 1 block within INDEXF.SYS. Files that have many access control entries (ACEs) or that are very fragmented might use more than 1 header. The default value of 16 leaves room for fewer than 10 files to be created before INDEXF.SYS must extend. Therefore, estimate the total number of files that will be created on the disk and specify it here. A good estimate improves performance of disk access. Setting the number too low can result in a fragmented index file. However, if you set the number too high, space allocated to headers cannot be made available later for file storage and can lead to wasted disk space. This value cannot be changed without reinitializing the volume.

INDEXF.SYS is limited as to how many times it can extend. When the map area in its header (where the retrieval pointers are stored) becomes full, files cannot be created and the message SYSTEM-W-HEADERFULL is displayed.

/INDEX= position Determines the location of the index file on a volume, using the keyword BEGINNING, MIDDLE, END, or BLOCK: n. The index file lists the names and addresses of all disk files, so it is constantly referenced.
/MAXIMUM_FILES= n Specifies the maximum number of entries in the index file, and therefore limits the number of files that a volume can contain. Once set, the maximum number of files for a volume cannot be increased without reinitializing the disk.
/PROTECTION=
(ownership=[:access][,...])
Specifies the protection code to be assigned to a volume. See Section 9.4 for details.
/WINDOWS= n Sets the default number of mapping pointers to be allocated for file windows. When a file is opened, the file system uses mapping pointers to access data in the file. The file system can read one file segment into memory for each available pointer.

Caution

The default value for the /HEADER qualifier is generally insufficient for ODS-2 disks. To improve performance and avoid SYSTEM-F-HEADERFULL errors, Compaq strongly recommends that you set this value to be approximately the number of files that you anticipate having on your disk. However, grossly overestimating this value will result in wasted disk space.

Examples


  1. $ INITIALIZE/HEADERS=100000 DUA3:
    

    This example shows how many entries to allocate in the index files for a large disk (a small disk might allocate 2000 entries).

  2. $ INITIALIZE/MAXIMUM_FILES=20000 DUA3:
    

    This example shows how to specify the characteristics of a small disk. Note that each directory and each extension header of a multiheader file counts as a file against this maximum value.

  3. 
    $ INITIALIZE/WINDOWS=10 DUA3:
    

    This example shows how to cite a large number of pointers for a large disk of 500 MB.

9.3.3 Initializing a New Volume with ODS-5 Format

You can initialize a new volume as an ODS-5 volume by entering the INITIALIZE command using the following format. Note that once you initialize the volume, the current contents of the volume are lost.


$ INITIALIZE /STRUCTURE_LEVEL=5 device-name volume-label

For example:


$ INITIALIZE /STRUCTURE_LEVEL=5 DKA300: DISK1
$ MOUNT DKA300: DISK1 /SYSTEM
%MOUNT-I-MOUNTED, DISK1 mounted on _STAR$DKA300:

The first command initializes the DKA300: device as an ODS-5 volume and assigns the volume-label DISK1. The second command mounts the DISK1 volume as a public volume.

To verify that the volume has been initialized as an ODS-5 volume, you can enter a SHOW DEVICE/FULL command; the system displays messages similar to the following:


$ SHOW DEVICE DKA200:/FULL

  Disk $10$DKA200:, device type RZ74, is online, allocated, deallocate
  on dismount, mounted, file-oriented device, shareable.

    Error count                    0    Operations completed 155
    .
    .
    .
  Volume Status:  ODS-5, subject to mount verification, file high-water
  marking, write-back caching enabled.

An alternative method for displaying the volume type is to issue a command and receive a response similar to the following:


$ WRITE SYS$OUTPUT F$GETDVI ("DKA200:","ACPTYPE")
F11V2

F11V2 indicates that the volume is ODS-2.

Note

If you plan to add the new volume to a volume set, the structure level of the new volume must match that of the volume set. If it does not, the Mount utility displays the following error message:


        Structure level on device ... is inconsistent with volume set.

9.3.4 Assisting Users in Accessing and Initializing Volumes

Initializing volumes for users might be necessary in some circumstances:

  • If the volume previously contained data, the protection code might prevent users from accessing and initializing the volume.
  • If the first file section on the volume has not reached its expiration date, users might not be able to initialize a tape volume.
  • If the volume is owned by anyone except [0,0], the user must have VOLPRO privilege to override volume protection. If users do not have VOLPRO privilege, they must ask the previous owner of the volume or you, as system manager, to initialize it for them.
  • If a tape is blank, the user must have VOLPRO and OPER privileges to access and initialize it.

9.4 Protecting Volumes

Protection based on user identification codes (UICs) restricts users' access to volumes. By assigning access types to volumes, you determine the kinds of actions various groups of users can perform on volumes. Section 9.4.1 and Section 9.4.2 explain the differences between UIC-based protection for disk and tape volumes.

For additional access control, you can set access control lists (ACLs) on volumes. Volume ACLs are copied from the VOLUME.DEFAULT security class template. See Section 12.6 for more information about ACLs.

Table 9-9 shows the types of access you can assign to disk and tape volumes.

Table 9-9 Access Types for Disk and Tape Volumes
Access Type Gives you the right to...
Read Examine file names, print, or copy files from the volume. System and owner categories always have read access to tape volumes.
Write Modify or write to existing files on a volume. The protection of a file determines whether you can perform a particular operation on the file. To be meaningful, write access requires read access. System and owner categories always have write access to tape volumes.
Create Create files on a disk volume and subsequently modify them. Create access requires read and write access. This type of access is invalid for tape volumes.
Delete Delete files on a disk volume, provided you have proper access rights at the directory and file level. Delete access requires read access. This type of access is invalid for tape volumes.
Control Change the protection and ownership characteristics of the volume. Users with the VOLPRO privilege always have control access to a disk volume, with the following exceptions:
  • Mounting a file-structured volume as foreign requires control access or VOLPRO privilege.
  • Mounting a volume containing protected subsystems requires SECURITY privilege.

Control access is not valid with tapes.

For more information about specifying protection codes, refer to the OpenVMS Guide to System Security. Chapter 12 discusses protection in general.

The following sections explain how to perform these operations:

Task Section
Protecting disk volumes Section 9.4.1
Protecting tape volumes Section 9.4.2
Auditing volume access Section 9.4.3

9.4.1 Protecting Disk Volumes

For file-structured ODS-2 volumes, the OpenVMS operating system supports the types of access shown in Table 9-9. The system provides protection of ODS-2 disks at the volume, directory, and file levels. Although you might have access to the directories and files on the volume, without the proper volume access, you are unable to access any part of a volume.

The default access types for the disk volume owner [0,0] are:

S:RWCD, O:RWCD, G:RWCD, W:RWCD.

The system establishes this protection with the default qualifier of the INITIALIZE command (/SHARE). Any attributes that you do not specify are taken from the current default protection.

Ways to Specify Protection

You can change permanently stored protection information in the following ways:

  • Use ACLs. The entire security profile (owner UIC, protection code, and ACL) is stored on the volume. If you change the volume security profile for a volume mounted clusterwide, the change is distributed to all nodes in the cluster. If you dismount and remount a volume, the security profile for the volume is preserved.
  • Use the DCL command SET SECURITY to modify the default security profile after a volume is mounted, including UIC- and ACL-based protection.
  • Use protection qualifiers with the DCL command INITIALIZE to specify UIC-based protection when you initialize a volume.
    You can also specify protection when you mount disk volumes, but you ordinarily do not do so because the protection that you specify is in effect only while the volume is mounted. For details, refer to the Mount utility (MOUNT) in the OpenVMS System Management Utilities Reference Manual.
  • Use the DCL command SET VOLUME after you mount a volume to change UIC-based volume protection.

The following sections explain how to perform these tasks:

Task Section
Specify protection when you initialize volumes Section 9.4.1.1
Change protection after volumes are mounted Section 9.4.1.2
Display protection Section 9.4.1.3

9.4.1.1 Specifying Protection When You Initialize Disk Volumes

This section explains how to specify UIC-based volume protection and ISO 9660-formatted media protection when you initialize volumes.

Specifying UIC-Based Protection

You can specify protection in one of the following ways when you initialize volumes:

  • Use the /PROTECTION qualifier with the INITIALIZE command. For example:


    $ INITIALIZE DUA7: ACCOUNT1/PROTECTION=(S:RWCD,O:RWCD,G:R,W:R)
    

    This example specifies a protection code for the disk volume ACCOUNT1 on the DUA7: device. The UIC of the volume is set to your process UIC.
  • Use one or more of the qualifiers shown in Table 9-10 with the INITIALIZE command. However, the protection that you set using the /PROTECTION qualifier overrides any of the defaults set when you use any other qualifier.

    Using INITIALIZE Command Qualifiers for Protection

    You usually do not change volume protection after you initialize a volume. By specifying a protection qualifier with the INITIALIZE command, you can establish the default protection of a volume. (The default qualifier of the INITIALIZE command is /SHARE, which grants all types of ownership all types of access.)
    Table 9-10 explains the qualifiers you can use to specify disk volume protection when you initialize disk volumes.

    Table 9-10 INITIALIZE Command Qualifiers for Protection
    Qualifier Explanation
    /PROTECTION The protection you specify with this qualifier overrides any protection you specify with other qualifiers.
    /SYSTEM All processes have read, write, create, and delete access to the volume, but only system processes can create first-level directories. ([1,1] owns the volume.) See the note following this table.
    /GROUP System, owner, and group processes have read, write, create, and delete access to the volume. World users have no access.
    /NOSHARE System and owner processes have read, write, and delete access to the volume. World users have no access. Group users also have no access unless you specify the /GROUP qualifier.

    Note

    The /SYSTEM qualifier grants all users complete access. However, users cannot create directories or files unless you perform one of the following actions:
    • Change the protection on the newly created master file directory (MFD), [000000]000000.DIR;1 to allow users to create their own directories under this parent directory.
    • Under the master file directory, create user directories that give users write access so that they, in turn, can create their own directories.

    System managers usually choose the second method.

Table 9-11 shows the UIC and protection that the system sets for disk volumes when you use the default, /SHARE, and other qualifiers with the INITIALIZE command.

Table 9-11 Protection Granted with INITIALIZE Command Qualifiers
Qualifier UIC Protection
/SYSTEM [1,1] S:RWCD,O:RWCD,G:RWCD,W:RWCD
/SYSTEM/NOSHARE [1,1] S:RWCD,O:RWCD,G:RWCD,W:RWCD
/GROUP [x,0] S:RWCD,O:RWCD,G:RWCD,W
/SHARE (the default) [x,x] 1 S:RWCD,O:RWCD,G:RWCD,W:RWCD
/NOSHARE [x,x] 1 S:RWCD,O:RWCD,G,W

1x,x is the UIC of the process that performs the initialization.

Specifying ISO 9660-Formatted Media Protection

The OpenVMS implementation of ISO 9660 does not include volume or volume set protection. The protection specified for the device on which the media is mounted determines accessibility to the ISO 9660 volumes or volume sets.

By default, the device protection is assigned to ISO 9660 files and directories. When you mount the volume, you can specify additional file protection using the UIC and PERMISSION protection fields included in the Extended Attribute Records (XARs) that might be associated with each file.

You can enable the protection fields by specifying either of the following items:

  • XAR mount option, using the following format:

    MOUNT/PROTECTION=XAR


    When you specify the XAR option for a file that has an associated XAR, the protection fields in the XAR are enabled.

  • DIGITAL System Identifier (DSI) mount option, using the following format:

    MOUNT/PROTECTION=DSI


    If you specify the DSI option, you enable the XAR permissions Owner and Group for XARs containing DSI.

For more information about the XAR and DSI options, refer to the OpenVMS Record Management Utilities Reference Manual.


Previous Next Contents Index