Document revision date: 15 July 2002
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

OpenVMS System Manager's Manual


Previous Contents Index

10.11.3 Populating the Logical Disk

Mount the logical disk and use OpenVMS commands such as CREATE/DIR, COPY, etc., or Record Management Services (RMS), to create files on the logical disk. You can dismount and remount the logical disk any number of times and update its contents as often as necessary. You can also apply UIC-based security and access control lists (ACLs) to files.

Once you are satisfied with the contents of the logical disk, you are ready to write it to a CD-R disk.

10.11.4 Writing to a CD-R Disk

When you are ready to write to a CD-R disk, do the following:

  1. Turn off other applications to ensure that the write operation will not be interrupted. An interruption might result in unreadable space on the CD-R disk. The write operation must complete to create a readable CD-ROM. You cannot reclaim the space used by an unfinished write operation.
  2. Enter the WRITE command in the following format:


    $  @SYS$MANAGER:CDRECORD WRITE  filename LDAn: DQnn: laser speed priority 
    

    where:
    filename is the file name and file extension of the container file.
    LDAn: is the name of the logical disk and can have a value of LDA1 to LDA9999.
    DQnn: is the device name of the CD-R or CD-RW drive.
    laser turns the laser beam on or off and can have a value of 0 (enable) or 1 (disable). The default is 0. Set this parameter to 1 (disable) when you want to test the process before actually writing to a CD-R disk.
    speed is the recording speed for the write operation and can have a value from 0 to 99. The default value is 0. CDRECORD.COM automatically determines the maximum recording speed based on the speed of the drive and the media speed rating. When speed is set to 0 (the default), CDRECORD.COM uses the maximum recording speed it automatically calculates. You can override this recording speed by entering a number from 1 to 99.

    Note

    A CD-R or CD-RW drive might write at one of a number of fixed speeds (for example, at 2x, 4x, 8x, 16x, and 20x). Enter an override speed to set the drive to one of the speeds that it is capable of using. If you enter an unsupported speed for the drive, CDRECORD.COM picks a supported speed close to what you specified.

    priority lets you increase the base priority for the current process. Increase the priority to avoid buffer underruns that could cause a failure in the write operation. You can specify a priority between 1 and 63. If you do not specify priority, your base priority is retained. If you increase the base priority, after the write operation completes you are asked if you want to reset the priority to its original level. If you answer no, the increased priority level is retained.

You should know whether or not your drive is required to record at a specific speed. With some drives, to minimize errors, you might need to record at a slower speed, depending on the ability of your computer to keep up the pace. You do not want the write operation to pause because the computer cannot provide the data quickly enough. Some drives can accommodate sporadic recording activity ("burn-proof" drives). Raising the priority parameter can also alleviate problems.

In the following example:


$  @SYS$MANAGER:CDRECORD WRITE  TESTFILE.DSK LDA1: DQA0: 0 12 

TESTFILE.DSK is the container filename and extension.

LDA1: is the device name of the logical disk.

DQA0: is the device name of the CD-R drive.

0 enables the laser beam.

12 is the recording speed.

10.11.5 Reusing a Container File

When you have finished writing the contents of a logical disk to one or more CD-ROMs, you can delete the container file or reuse it, if you plan to create more CD-ROMs in the future. The advantages of reusing it are:

Note

Reusing a container file DELETES the current contents of the file.

To reuse a container file, enter the REUSE command in the following format:


$  @SYS$MANAGER:CDRECORD REUSE filename LDAn: label 

where:

filename is the name of the container file and its extension.

LDAn: is the device name of the logical disk.

label is the volume label of the logical disk.

In the following example:


$  @SYS$MANAGER:CDRECORD REUSE TESTFILE.DSK LDA1: FRED 

TESTFILE.DSK is the name of the container file.

LDA1: is the device name of the logical disk.

FRED is the volume label of the logical disk.

Use OpenVMS commands to create directories and files. Once you are satisfied with the contents, you are ready to write to a CD-R disk with the CDRECORD WRITE command.

10.11.6 CDRECORD Command Summary

The format for the CDRECORD.COM command line is:


$ @SYS$MANAGER:CDRECORD command [parameter1|parameter2|...] 

The CDRECORD commands are:

Table 10-9 summarizes the parameters for each command.

Table 10-9 CDRECORD.COM Commands and Parameters
HELP [OVERVIEW|INQUIRE|SETUP|REUSE|WRITE]
OVERVIEW Displays online help on using CDRECORD.COM to create a CD-ROM.
INQUIRE Displays online help for the INQUIRE command.
SETUP Displays online help for the SETUP command.
REUSE Displays online help for the REUSE command.
WRITE Displays online help for the WRITE command.
INQUIRE DQnn:
DQnn: Device name of the CD-R or CD-RW drive. The first two characters must be DQ. The third character is an alphabetic character from A to Z. The fourth character must be 0 or 1. The default is DQA0.
REUSE filename LDAn: label
filename File name and extension of the container file.
LDAn: Name of the logical disk. Can have a value of LDA1 to LDA9999. The default is LDA1.
label Volume label of the logical disk.
SETUP filename LDAn: label nnnn
filename Name of the container file. Follow the usual rules for naming files and include a file extension.
LDAn: Name of the logical disk. Can have a value of LDA1 to LDA9999. The default is LDA1.
label Volume label for the logical disk and the CD-ROM. Follow the usual rules for assigning volume labels.
nnnn Number of 512-byte blocks to allocate for the container file. The number must be a multiple of 4. The default value is 1250000 (640 MB).
WRITE filename LDAn: DQnn: laser speed priority
filename File name and extension of the container file.
LDAn: Name of the logical disk. Can have a value of LDA1 to LDA9999. The default is LDA1.
DQnn: Device name of the CD-R or CD-RW drive. The first two characters must be DQ. The third character is an alphabetic character from A to Z. The fourth character must be 0 or 1. The default is DQA0.
laser Turns the laser beam on or off. Can have a value of 0 (enable) or 1 (disable). The default is 0.
speed Recording speed for the write operation. Can have a value from 0 to 99. The default value is 0 to accept the maximum recording speed calculated by CDRECORD.COM. A value of 1 to 99 manually sets the recording speed (to that value).
priority Changes the base priority for the current process. Can have a value of 1 to 63. If you do not specify a value, your base priority is retained. If you change the base priority, you are asked if you want to reset the priority to its original level. If you answer no, the increased priority level is retained. Requires ALTPRI privilege.

The steps for creating a CD-ROM are:

  1. Use the INQUIRE command to verify the device name of the CD-R drive. For example:


    $  @SYS$MANAGER:CDRECORD INQUIRE DQA0: 
    

  2. Use the SETUP command to set up a logical disk and container file on the hard drive. For example:


    $  @SYS$MANAGER:CDRECORD SETUP TESTFILE.DSK LDA1: FRED 1250000 
    

  3. Populate the logical disk by using OpenVMS commands such as CREATE/DIR and COPY.
  4. Use the WRITE command to write the contents of the logical disk to a CD-R disk. For example:


    $  @SYS$MANAGER:CDRECORD WRITE TESTFILE.DSK LDA1: DQA0: 
    

10.12 Hard Links

A link, or directory entry, is an object in a directory that associates a file name and a version number with a specific file. All links on a volume must represent files on the same volume.

With the introduction of hard link support in OpenVMS Alpha Version 7.3, OpenVMS supports three kinds of links: primary links, aliases, and hard links.

OpenVMS Alpha supports files with 0 or more links. The first link to a file is referred to as the "primary link," and is distinguished by having the directory ID and name of the link stored in the file header. Additional links are either aliases or hard links, depending on whether the volume the file resides on has hard links enabled or disabled.

On OpenVMS Alpha systems, you can enable hard links on particular volumes. On volumes where hard links are not enabled, non-primary links are aliases. If you choose to enable hard link capability, you cannot create VMS aliases for files on that volume. A volume can support either hard links or aliases, but not both. The SET FILE/ENTER command is used to create either a hard link or an alias for a file.

The essential difference between hard links and aliases is in the effect of a delete operation. What is usually referred to as deleting a file is more precisely deleting a link to that file. When a link to a file is deleted, the associated file may also be deleted. Whether a file is deleted or not depends on if the volume that the file is on has hard links enabled, and if a hard link to that file has been created.

If you have hard links enabled, a file is actually deleted when there are no more links to file. If you do not have hard links enabled, and you have not created an alias for a file, essentially only one link to that file exists: the primary link. If you create an alias for that file, and you delete the alias, the file still exists because the primary link to that file has not been deleted. The alias is just another name in a directory for this link. Deleting the primary link deletes the file, leaving the alias entries.

Attempting to access a file through an alias link to a deleted file results in a "no such file" error. With a primary link and hard links, many links exist. You actually delete a file when you delete both the primary link and all hard links to that file.

An important related consideration is disk quota. On OpenVMS, the size of each file is charged to the file owner's disk quota. If other users create hard links to a file, they are not charged disk quota. The owner may delete any links to the file in directories he can access, while hard links in other user's directories may cause the file to be retained; the owner will continue to be charged for its quota.

When you enable hard link support on an existing volume, be sure to also execute the ANALYZE/DISK/REPAIR command to ensure the proper operation of hard links.

OpenVMS supports hard links, or aliases, to directories as well as to files. Most UNIX systems limit hard links only to normal files.

10.12.1 Hard Link Examples (INIT and SET VOLUME)

You can enable hard link support using either the INITIALIZE command or the SET VOLUME command.

To initialize an ODS-5 disk with hard links enabled, issue the following command:


$ INIT/VOLUME_CHARACTERISTICS=HARDLINKS

To enable hard links on a mounted Files-11 volume, issue the following command:


$ SET VOLUME/VOLUME_CHARACTERISTICS=HARDLINKS

If you have a volume that has already been enabled with hard link support and you want to change it, you can disable it using the SET VOLUME command.


$ SET VOLUME SYS$DISK/VOLUME_CHARACTERISTICS=NOHARDLINKS

Issuing this command disables hard link support. However, you should be aware that changing from enabling hard links to disabling hard links may result in some strange file behavior. For example, assume that you have disabled hard link support as shown in the example above, but you would like to create an alias for your file FOO:


$ CREATE FOO.A
$ SET FILE FOO.A/ENTER=FOO.B

You have created an alias for FOO.A called FOO.B. Now you want to delete the original file:


$ DELETE FOO.A;1

FOO.A is deleted. However, if you look for FOO.B on the volume using the directory command, you receive a "File not found" error, because the primary link to that file no longer exists. For example:


$ DIR FOO.B

To fix this problem, or to check the number of hard links to a file, issue the following command:


$ ANALYZE/DISK/REPAIR

ANALYZE/DISK/REPAIR counts the number of directory entries that references each file, and sets the link count if it is incorrect. Before creating aliases for files on disks that have previously had hard link support enabled, be sure to use the ANALYZE/DISK/REPAIR command to set the link count correctly. If you are unsure as to whether hard links are currently enabled or disabled, issue the SHOW DEVICE/FULL command.

Use DIRECTORY/FULL and DUMP/HEADER to report the link counts. To check the number of links, issue the following command:


$ DIRECTORY/LINK


Chapter 11
Using BACKUP

You can guard against data loss or corruption by using the OpenVMS Backup utility (BACKUP) to create copies of your files, directories, and disks. In case of a problem---for example, a disk drive failure---you can restore the backup copy and continue your work with minimal disruption.

Information Provided in This Chapter

This chapter describes the following tasks:
Task Section
Formulating a BACKUP strategy Section 11.3
Setting process quotas for efficient backups Section 11.7
Using disks and tapes Section 11.8
Listing the contents of a BACKUP save set Section 11.10
Backing up user disks and volume shadow sets Section 11.15
Restoring user disks and volume shadow sets Section 11.16
Backing up and restoring the system disk Section 11.17
Ensuring data integrity Section 11.18
Troubleshooting Section 11.19

This chapter explains the following concepts:
Concept Section
Types of backups Section 11.2
The BACKUP command line Section 11.4.1
The Backup Manager Section 11.4.2
Save sets Section 11.5
BACKUP file formats Section 11.6
Volume initialization Section 11.8.1
OPCOM and volumes Section 11.9
Multivolume BACKUP operations Section 11.11
BACKUP tape label processing Section 11.12
Standalone BACKUP (VAX only) Section 11.17.2

See Guidelines for OpenVMS Cluster Configurations for information about using BACKUP when your backup medium is connected to a Fibre Channel interconnect.

11.1 Overview of BACKUP Tasks

For BACKUP to effectively guard against data loss, you must back up important data on a regular basis and be familiar with how to restore the data when necessary.

Besides backing up your own files, directories, and disks, you should also back up your system disk. If you have a standalone workstation, backing up your system disk is probably your responsibility. If your system is part of a large clustered computer system, an operator or system manager is probably responsible for backing up the system disk.

The two ways to back up your system disk are:

Performing an image backup using BACKUP also eliminates disk fragmentation. Fragmentation can occur as you create and extend files on a disk. If the file system cannot store files in contiguous blocks, it stores them in noncontiguous pieces. Eventually, the disk can become severely fragmented and system performance suffers.

To eliminate fragmentation, perform an image backup of the disk and restore the backup copy. When you restore the image backup, BACKUP places the files on the disk contiguously. Alternatively, you can perform a disk-to-disk image backup without using the /SAVE_SET qualifier. This creates a functionally equivalent copy of the entire system disk, on which files are stored contiguously.

Note

Some layered products have their own special backup procedures. For more information, refer to the layered product documentation.

11.2 Understanding Types of Backups

The following table lists the types of backup operations.
Operation Description
File operation Processes individual files or directories. Section 11.13 describes file operations.
Selective operation Processes files or volumes selectively, according to criteria such as version number, file type, UIC, date and time of creation, expiration date, or modification date.

Performs selective save operations by using wildcard characters and input file-selection qualifiers (for example, /BACKUP, /BEFORE, /BY_OWNER [/OWNER_UIC], /CREATED, /EXCLUDE, /EXPIRED, /MODIFIED, and /SINCE). Section 11.13 describes selective operations.

Physical operation Copies, saves, restores, or compares an entire volume in terms of logical blocks, ignoring any file structure.
Image operation Processes all files on the input disk. The types of image operations are:
  • An image backup (also called a full backup) saves a copy of all the files on a disk (or volume) to a special file called a save set.
  • An image restore initializes the output disk and restores an entire volume.
  • An image copy operation initializes the output disk and copies an entire volume; the image backup is a logical duplicate of the contents of the disk.
  • An image compare operation compares the contents of entire volumes.

Because an image copy or backup operation processes all files on the input volume, you cannot specify file-selection qualifiers for these operations. You can, however, restore files and directories selectively from an image save set.

Incremental operation The two types of incremental operations are:
  • An incremental backup saves only those files that have been created or modified since the most recent backup that was performed using the /RECORD qualifier. (The /RECORD qualifier records the date and time that the files are backed up.)
  • An incremental restore operation restores an incremental save set. Specify the command qualifier /INCREMENTAL to perform this operation. Section 11.16.2 describes incremental restore operations.

Two types of BACKUP operations, file and image, support converting ODS-5 file names to ODS-2 file names. Refer to Section 9.5.5.3 for more information.


Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
6017PRO_045.HTML