INITIALIZE

From VSI OpenVMS Wiki
Jump to: navigation, search

If you are looking for the queue initialization command, see INITIALIZE/QUEUE.

INITIALIZE is a command that Formats a disk or magnetic tape volume, writes a label on the volume, and leaves the disk empty except for the system files containing the structure information. All former contents of the disk are lost (but not necessarily overwritten).

Requires VOLPRO (volume protection) privilege for most INITIALIZE command operations.

Syntax

INITIALIZE  device-name[:] volume-label

device-name[:] specifies the name of the device on which the volume to be initialized is physically mounted.

volume-label specifies the identification to be encoded on the volume (volume label).

Description

The default format for disk volumes in the OpenVMS operating system is called the Files-11 On-Disk Structure Level 2. The default for magnetic tape volumes is based on Level 3 of the ANSI standard for magnetic tape labels and file structure for informational interchange (ANSI X3.27-1978).

The INITIALIZE command can also initialize disk volumes in the Files-11 On-Disk Structure Level 1 format.

You must have VOLPRO privilege to initialize a volume, except in the following cases:

  • A blank disk or magnetic tape volume; that is, a volume that has never been written
  • A disk volume that is owned by your current user identification code (UIC) or by the UIC [0,0]
  • A magnetic tape volume that allows write (W) access to your current UIC that was not protected when it was initialized

After the volume is initialized and mounted, the SET SECURITY command may be used to modify the security profile. When you initialize a disk volume, the caching attribute of its root directory (000000.DIR;1) is set to write-through. This means that by default, all the files and directories that you create in the volume will inherit a caching attribute of write-through. To change the caching attribute, use the SET FILE command with the /CACHING_ATTRIBUTE qualifier.

When the INITIALIZE command initializes a magnetic tape volume, it always attempts to read the volume. A blank magnetic tape can sometimes cause unrecoverable errors, such as the following:

  • An invalid volume number error message:
%INIT-F-VOLINV, volume is invalid
  • A runaway magnetic tape (this frequently occurs with new magnetic tapes that have never been written or that have been run through verifying machines). You can stop a runaway magnetic tape only by setting the magnetic tape drive off line and by then putting it back on line.

If this type of unrecoverable error occurs, you can initialize a magnetic tape successfully by repeating the INITIALIZE command from an account that has VOLPRO (volume protection) privilege and by specifying the following qualifier in the command:

/OVERRIDE=(ACCESSIBILITY,EXPIRATION)

This qualifier ensures that the INITIALIZE command does not attempt to verify any labels on the magnetic tape.

If you have VOLPRO privilege, the INITIALIZE command initializes a disk without reading the ownership information. If you do not have VOLPRO privilege, the INITIALIZE command checks the ownership of the volume before initializing the disk. A blank disk or a disk with an incorrect format can sometimes cause a fatal drive error. If a blank disk or a disk with an incorrect format causes this type of error, you can initialize a disk successfully by repeating the INITIALIZE command with the /DENSITY qualifier from an account that has VOLPRO privilege.

Many of the INITIALIZE command qualifiers allow you to specify parameters that can maximize input/output (I/O) efficiency.

Disks

A few things to keep in mind when initializing disks are:

  • Volume structure: is it going to be ODS-1, ODS-2, or ODS-5?
  • Block allocation:
    • what size is the MFD going to be/how many directories do you plan to have?
    • how many files do you plan to have?
    • what is the size of the volume and will it ever be extended?
    • how many contiguous blocks should be allocated for files on the system?
  • Security:
    • does the volume need to explicitly overwritten?
    • will you need erase-on-delete to be switched on?
    • will you need highwater marking?
    • who will be using this volume and what should be volume protection be?
  • Data integrity:
    • are there any bad blocks on the volume?
    • do read or write operation checks need to be enabled?

Volume Structure

/STRUCTURE=level specifies whether the volume should be formatted in ODS-1, ODS-2, or ODS-5. Structure Level 1 is incompatible with the /DATA_CHECK and /CLUSTER_SIZE qualifiers. The default protection for a Structure Level 1 disk is full access to system, owner, and group, and read (R) access to all other users.

Note that Alpha does not support ODS-1 disks, and specifying 1 on Alpha results in an error.

/DIRECTORIES=n controls, depending on the disk structure, the number of directories or the size of the master file directory.

For ODS-1 disks, /DIRECTORIES allow space for the specified number of directory entries to be reserved in the master file directory.

For ODS-2 and ODS-5, /DIRECTORIES allows the initial size of the master file directory to be set. The specified number is divided by 16, to produce the number of blocks to preallocate. This number is then rounded up to a whole number of clusters.

The /DIRECTORIES value must be an integer between 16 and 16000. The default value is 16.

ODS-1

/ACCESSED=number-of-directories specifies that, for disk volumes, the number of directories allowed in system space must be a value from 0 to 255. The default value is 3. Affects Files-11 On-Disk Structure Level 1 (ODS-1) disks only.

ODS-5

/VOLUME_CHARACTERISTICS=([[NO]HARDLINKS,] [[NO]ACCESS_DATES[=delta-time]],[NO]SPECIAL_FILES) controls volume characteristics of ODS-5 disks only:

  • [NO]HARDLINKS enables or disables hardlinks
  • [NO]ACCESS_DATES[=delta-time] controls automatic updates of access dates. The default value for delta-time is 1 second, chosen to comply with the "seconds since EPOCH" time interface required by POSIX st_atime. A site can choose a larger delta time to reduce overhead if 1-second granularity is not required.

Note that the NOACCESS_DATES option affects only the node on which the command is issued. Other nodes are not affected by the change until the next time the volume is mounted.

  • [NO]SPECIAL_FILES allows you to disable symlinks. This eliminates file access failure audits that may occur due to symlinks being enabled for all processes in the current implementation.

Size and Expansion Limit

/LIMIT[=n] specifies the maximum growth potential of the volume in blocks. If no value is specified, the maximum expansion potential is set up depending on the value of /CLUSTER_SIZE: if it is 8, 1TB of expansion is set up; if it is less than 8, expansion limit is set to 65535*4096*Cluster_value because the maximum size of the bitmap is 65535 blocks.

The minimum allowed value is the largest of the following values:

  • The value supplied with /LIMIT
  • The physical disk size
  • The size resulting from a 256-block BITMAP.SYS file (that is, 256 * 4096 bits/block * Disk Cluster Value)

If a value less than the minimum is supplied, the value is increased to the minimum. This value is displayed (in blocks) as the "Expansion Size Limit" in the output from a SHOW DEVICE/FULL command.

If you specify /LIMIT and do not explicitly set a value for the following parameters, the defaults for these parameters are set as follows:

  • /CLUSTER_SIZE: 16
  • /MAXIMUM_FILES: 16711679 files
  • /HEADERS: 0.5 percent of the size of the current device MAXBLOCK (an F$GETDVI() item code)

For example, for a 33GB disk, the default number of preallocated header blocks would be approximately 355000.

/SIZE=n specifies the size in blocks of the logical volume (i.e. available to the file system). This allows you to INITIALIZE a disk with a file system size that is less than the physical volume size, which can be useful if you plan to create a shadow set using this disk and a smaller physical disk. The value of n is displayed (in blocks) as "Logical Volume Size" in the output from a SHOW DEVICE/FULL command.

For DECram disks, /SIZE specifies the size (in blocks) of the disk (device type DT$_RAM_DISK) to be allocated from available memory. The size of the device is created at disk initialization time.

To deallocate space, specify /SIZE=0. All resources specifically allocated to the DECram disk are returned to the system.

Note that n cannot exceed 524,280 blocks on versions of DECram prior to Version 2.3. DECram Version 2.3 running on an Alpha system supports up to 67,108,864 blocks, equivalent to 32GB.

Block Allocation

/CLUSTER_SIZE=number-of-blocks defines, for disk volumes, the minimum allocation unit in blocks. See Volume Cluster Size for more information. If you specify /LIMIT and do not specify a value for /CLUSTER_SIZE, a value of /CLUSTER_SIZE=16 is used.

/EXTENSION=n specifies the number of blocks to use as a default extension size for all files on the volume. The extension default is used when a file increases to a size greater than its initial default allocation during an update. For ODS-2 and ODS-5 disks, the value for the number-of-blocks parameter can range from 0 to 65,535. The default value is 5. For ODS-1 disks, the value can range from 0 to 255. The OpenVMS operating system uses the default volume extension only if no different extension has been set for the file and no default extension has been set for the process by using the SET RMS_DEFAULT command.

/HEADERS=number-of-headers specifies, for disk volumes, the number of file headers to be allocated for the index file. The minimum and default value is 16, which is generally insufficient for ODS-2 and ODS-5 volumes. The maximum is the value set with the /MAXIMUM_FILES qualifier. However, if /LIMIT is specified and no value is specified for /HEADERS or /MAXIMUM_FILES, the following defaults apply:

  • /MAXIMUM_FILES: 16711679 files
  • /HEADERS: 0.5 percent of the size of the current device MAXBLOCK (an F$GETDVI item code)

For example, for a 33GB disk, the default number of preallocated header blocks would be approximately 355000.

Note that you cannot change the number of file headers without reinitializing the volume, so be mindful of the value of this qualifier.

/INDEX=position specifies the location of the index file for the volume's directory structure. Possible positions are as follows:

  • BEGINNING - beginning of the volume
  • MIDDLE - middle of the volume (default)
  • END - end of the volume
  • BLOCK:n - beginning of the logical block specified by n

/WINDOWS=n specifies the number of mapping pointers (used to access data in the file) to be allocated for file windows. The value can be an integer in the range of 7 to 80. The default is 7.

Data Integrity

/BADBLOCKS=(area[,...]) specifies, for disk volumes, faulty areas on the volume. The INITIALIZE command marks the areas as allocated so that no data is written in them.

Possible formats for area are as follows:

Format Description
lbn[:count] Logical block number (LBN) of the first block and optionally a block count beginning with the first block, to be marked as allocated
sec.trk.cyl[:cnt] Sector, track, and cylinder of the first block, and optionally a block count beginning with the first block, to be marked as allocated

All media supplied by VSI and supported on the OpenVMS operating system, except diskettes and TU58 cartridges, are factory formatted and contain bad block data. The Bad Block Locator utility (BAD) or the diagnostic formatter EVRAC can be used to refresh the bad block data or to construct it for the media exceptions above. The /BADBLOCKS qualifier is necessary only to enter bad blocks that are not identified in the volume's bad block data.

DIGITAL Storage Architecture (DSA) disks (for example, disks attached to UDA-50 and HSC50 controllers) have bad blocks handled by the controller, and appear logically perfect to the file system.

For information on how to run BAD, see the [OpenVMS Bad Block Locator Utility Manual].

/DATA_CHECK[=(option[,...])] checks all read and write operations on the disk. By default, no data checks are made. Specify one or both of READ (checks all read operations) and WRITE (checks all write operations). /DATA_CHECK specified without a value defaults to WRITE.

/VERIFIED indicates whether the disk has bad block data on it. Use the /NOVERIFIED qualifier to ignore bad block data on the disk. The default is the /VERIFIED qualifier for disks with 4096 blocks or more and the /NOVERIFIED qualifier for disks with less than 4096 blocks.

System Disks

/GPT controls the creation of GPT.SYS which contains contains partition/boot information needed by the IA64 console software. The default for Integrity servers is /GPT, the default for Alpha servers is /NOGPT. If /NOGPT is specified, the pre-Version 8.2 VBN layout of [000000]INDEXF.SYS is used.

/HOMEBLOCKS=option specifies where the volume's homeblock and spare copy of the homeblock are placed on disk. The value of option can be one of the following:

Option Description
GEOMETRY Causes the homeblocks to be placed at separate locations on disk, to protect against failure of a disk block. Placement depends on the reported geometry of the disk.
FIXED (default) Causes the homeblocks to be placed at separate fixed locations on the disk. Placement is independent of the reported geometry of the disk. This caters to disks that report different geometries according to which type of controller they are attached to.
CONTIGUOUS Causes the homeblocks to be placed contiguously at the start of the disk. When used with the /INDEX=BEGINNING qualifier, this setting allows container file systems to maximize the amount of contiguous space on the disk, for example, to hold one large file, such as a database.


Security Settings

Erase On Delete

/ERASE specifies whether data security erase is performed and controls the volume erase-on-delete characteristic.

When /ERASE is specified with no keywords, this command does the following:

  • Performs a data security erase (DSE) by writing the system- specified erase pattern into every block on the volume before initializing it. The amount of time taken by the DSE operation depends on the volume size.
  • Sets the volume characteristic to ERASE_ON_DELETE so that each file on the volume will be erased by a DSE when it is deleted.

/ERASE=INIT performs a data security erase (DSE) operation on the volume before initializing it, but does not set the volume characteristic to ERASE_ON_DELETE. This operation takes longer than specifying /ERASE=DELETE and is equivalent to performing SET VOLUME/NOERASE_ON_DELETE.

/ERASE=DELETE sets the ERASE_ON_DELETE volume characteristic, but does not perform a DSE operation on the disk.

If neither (or both) keywords are specified, both actions are performed. That is, /ERASE is equivalent to /ERASE=(INIT,DELETE).

Highwater Marking

/HIGHWATER (default) sets the file high-water mark (FHM) volume attribute, which guarantees that users cannot read data that they have not written. This applies to ODS-2 and ODS-5 disks only. The /NOHIGHWATER qualifier disables FHM for a disk volume. You cannot specify the /NOHIGHWATER qualifier for magnetic tape.

Protection

For volume protection settings see Volume Protection below.

/FILE_PROTECTION=code (ODS-1 only) defines for disk volumes the default protection to be applied to all files on the volume.

Specify the code according to the standard syntax rules described in the UIC Protection article. Any attributes not specified are taken from the current default protection.

Note that this attribute is not used when the volume is being used on an OpenVMS system, but is provided to control the process's use of the volume on RSX-11M systems. OpenVMS systems always use the default file protection. Use the SET PROTECTION/DEFAULT command to change the default file protection.

Tape

When initializing tapes, you need to take into account the following:

  • tape density
  • whether or not it is going to be used in a heterogenous vendor environment
  • whether the tape data needs to be explicitly overwritten upon initializing
  • what the tape label is going to be like
  • whether media compaction should be turned on
  • whether any label checks (accessibility, expiration, owner identifier) need to be skipped

Density

/DENSITY=density-value allows you to specify the format density value for certain tapes and disks. See Tape Densities for possible values. For RXnn diskette drives, the following densities can be specified:

Keyword Meaning
single RX01 - 8 inch
double RX02 - 8 inch
dd double density: 720K - 3 1/2 inch
hd high density: 1.44MB - 3 1/2 inch
ed extended density: 2.88MB - 3 1/2 inch

If you do not specify a density value for a diskette being initialized on a drive, the system leaves the volume at the density to which the volume was last formatted.

Note that RX33 diskettes cannot be read from or written to by RX50 disk drives. RX50 diskettes can be read from and written to by RX33 disk drives; they cannot be formatted by RX33 disk drives.

Tape Erase

/ERASE physically destroys deleted data by writing over it. If /ERASE is not specified, the data is not explicitly written over. It is valid for ANSI magnetic tape volumes and magnetic tape devices that support the hardware erase function, such as TU78 and MSCP magnetic tapes.

Different Vendors

/INTERCHANGE specifies that the magnetic tape will be used for interchange in a heterogeneous vendor environment. The /INTERCHANGE qualifier omits the ANSI VOL2 labels. The security profile of a tape volume is stored in the ANSI VOL1 and VOL2 labels written on the tape. The VOL2 label contains system-specific information. To override the creation of VOL2 labels, specify the /INTERCHANGE qualifier with the INITIALIZE command or the INIT$_INTERCHANGE itemcode on the $INIT_VOL system service.

Tape save sets that were created with the /INTERCHANGE qualifier can be copied to disk with the COPY command as opposed to BACKUP.

Label

/LABEL=option defines characteristics for the magnetic tape volume label:

Option Description
OWNER_IDENTIFIER:"(14 ANSI characters)" Allows you to specify the Owner Identifier field in the volume label. The field specified can accept up to 14 ANSI characters.
VOLUME_ACCESSIBILITY:"character" Specifies the character to be written in the volume accessibility field of the OpenVMS ANSI volume label VOL1 on an ANSI magnetic tape. The character may be any valid ANSI "a" character. This set of characters includes numeric characters, uppercase letters, and any one of the following nonalphanumeric characters:
! " % ' ( ) * + , - . / : ; < = > ?

By default, the OpenVMS operating system provides a routine that checks this field in the following manner:

  • If the magnetic tape was created on a version of the OpenVMS operating system that conforms to Version 3 of ANSI, then this option must be used to override any character other than an ASCII space.
  • If a protection is specified and the magnetic tape conforms to an ANSI standard that is later than Version 3, then this option must be used to override any character other than an ASCII 1.

If you specify any character other than the default, you must specify the /OVERRIDE=ACCESSIBILITY qualifier on the INITIALIZE and MOUNT commands in order to access the magnetic tape.

Compaction

/MEDIA_FORMAT=[NO]COMPACTION controls whether data records are automatically compacted and blocked together on any device that supports data compaction. Data compaction and record blocking increase the amount of data that can be stored on a single tape cartridge. Note that once data compaction or noncompaction has been selected for a given cartridge, that same status applies to the entire cartridge.

Skip Tape Checks

/OVERRIDE requests the INITIALIZE command to ignore data on a magnetic tape volume that protects it from being overwritten. You can specify one or more of the following options:

Option Description
ACCESSIBILITY If the installation allows, this option overrides any character in the Accessibility field of the volume. The necessity of this option is defined by the installation. That is, each installation has the option of specifying a routine that the magnetic tape file system will use to process this field. By default, OpenVMS provides a routine that checks this field in the following manner. If the magnetic tape was created on a version of OpenVMS that conforms to Version 3 of ANSI, this option must be used to override any character other than an ASCII space. If a protection is specified and the magnetic tape conforms to an ANSI standard that is higher than Version 3, this option must be used to override any character other than an ASCII 1. To use the ACCESSIBILITY option, you must have the user privilege VOLPRO or be the owner of the volume.
EXPIRATION Allows you to write to a tape that has not yet reached its expiration date. You must have the VOLPRO privilege to override volume protection, or your UIC must match the UIC written on the volume.
OWNER_IDENTIFIER Allows you to override the processing of the Owner Identifier field of the volume label.

If you specify only one option, you can omit the parentheses. To initialize a volume that was initialized previously with the /PROTECTION qualifier, your UIC must match the UIC written on the volume or you must have VOLPRO privilege. You can initialize a volume previously initialized with /PROTECTION if you have control access.

Volume Protection

/OWNER_UIC=uic specifies an owner user identification code (UIC) for the volume. The default is your default UIC. For magnetic tapes, no UIC is written unless protection on the magnetic tape is specified. If protection is specified, but no owner UIC is specified, your current UIC is assigned ownership of the volume.

/PROTECTION=(ownership[:access][,...]) applies the specified protection to the volume. The default is your default protection. Note that the /GROUP, /SHARE, and /SYSTEM qualifiers can also be used to define protection for disk volumes. For magnetic tape, the protection code is written to an OpenVMS specific volume label. The system applies only read (R) and write (W) access restrictions; create and delete (D) access are meaningless. Moreover, the system and the owner are always given both read (R) and write (W) access to magnetic tapes, regardless of the protection code you specify. Any attributes not specified are taken from the current default protection. When you specify a protection code for an entire disk volume, the access type E (execute) indicates create access.

/GROUP is used in conjunction with the /NOSHARE qualifier to create a group volume. The group volume allows access by system (S), owner (O), and group (G) accessors. The protection is (S:RWCD,O:RWCD,G:RWCD,W). The owner user identification code (UIC) of the volume defaults to your group number and a member number of 0.

/SHARE (default) permits all categories of access by all categories of ownership. /NOSHARE defines access to group (unless the /GROUP qualifier is also specified) and world processes.

/SYSTEM sets the owner UIC to [1,1], protection to complete access by all ownership categories, except that only system processes can create top-level directories.

/USER_NAME=name specifies a username to be associated with the volume (1-12 alphanumeric characters). The default is the username of the process that initializes the volume.

Shadow Sets

INTIIALIZE/SHADOW initializes multiple members of a future shadow set. Initializing multiple members in this way eliminates the requirement of a full copy at mount. See Shadow Set for more information on creating shadow sets.