labelvol

Purpose

Use the labelvol command to load selected volumes and write new volume labels to these volumes.

Caution:

This command erases all existing data on the selected volumes.

In Oracle Secure Backup, a volume label typically contains a Volume ID—for example, lev0-0001—and a volume tag, which is a barcode. These two attributes uniquely identify a tape. Normally, Oracle Secure Backup creates a volume label when it first writes to a tape. You may want to label a volume manually in the following circumstances:

  • The volume has a barcode but resides in a library without a barcode reader. In this case, you must manually inform Oracle Secure Backup of the barcode so that it can properly be written to the volume label.

  • You want to reserve the volume for use in a particular media family. In this case, prelabeling the volume restricts its use to the media family.

See Also:

"Library Commands" for related commands

Prerequisites

You must have the right to manage devices and change device state to use the labelvol command.

Syntax

labelvol::=

lab•elvol [ --drive/-D drivename ] [ --barcode/-b barcode ] 
[ --force/-f ] [ --obtaropt/-o obtar-option ]... [ se-range ]

Semantics

--drive/-D drivename

Specifies the name of the tape drive to be used to label the volume. If you do not specify a tape drive name, then the drive variable must be set.

--barcode/-b barcode

Specifies a barcode for the volume.

--force/-f

Forces the labeling of a volume. Executing the command with this option overrides any conditions that would otherwise prevent the labelvol command from functioning. This option enables you to overwrite unexpired volumes. Also, you can overwrite an incorrect manual entry for a barcode without the currently required prior step of executing an unlabelvol command.

--obtaropt/-o obtar-option ...

Specifies obtar options. For example -J enables debug mode and provides more details in backup and restore transcripts. See the section entitled "obtar Options" for details on obtar options.

se-range

Specifies a range of storage elements holding the volumes to be labeled. If omitted, then the volume currently loaded in the specified drive is labeled. Refer to "se-range" for a description of the se-range placeholder.

Example

Example 2-42 reserves the tape in storage element 4 in library lib1 for use by media family mf_incr.

Example 2-42 Manually Labeling a Volume

ob> insertvol unlabeled --library lib1 4
ob> labelvol --drive tape1 --obtaropt -Xfam:mf_incr 4