Chapter 5. Operating OpenVault

This chapter describes the OpenVault commands that are used to perform operator tasks. The tasks are divided into normal, everyday operations and those that are performed occasionally, mainly for organizational reasons. The sections in this chapter describe the following tasks:

Performing Daily Tasks

This section describes the most common operator storage management tasks. Mainly, these tasks revolve around manipulating cartridges and managing devices (libraries and drives).

Manipulating Cartridges

The operator manipulates cartridges by performing the operations as described in the following subsections.

Mounting Cartridges

A cartridge is mounted in a drive to allow a read or write operation to be performed by an application. When a cartridge is mounted, as performed with the default ov_mount command, it is placed into an available drive that is compatible with the cartridge's format. A device name is returned so the cartridge can be manipulated by an application. Once the cartridge is mounted into the drive, a shell process is started that allows an application to manipulate the drive. After the application finishes its operation, the shell process exits, and the cartridge is automatically unmounted.

The following are examples of the mount command options:

  • A cartridge using its cartridge ID:

    ov_mount -C -I sidename cartridgeID 

  • A particular drive by its drive name, as recorded in the client configuration file (see “Setting Up Drives” in Chapter 4):

    ov_mount -d driveName -C cartridgeID -I sidename

  • A volume owned by an application:

    ov_mount -V volName -A application 

    Note: Occasionally, you may have to use ov_unmount to free a cartridge that is still in a drive because the application that mounted it has died. The unmount command uses all the options as the mount command, as described in “Mounting Cartridges”.

Checking the Task Request Queue

When an OpenVault task request is initiated (for example, by a client application or the OpenVault ov_mount command), a task request (with its own ID) is generated and placed in the OpenVault server task queue. To check the pending task requests, use:

ov_stat -q 

Canceling a Pending Task Request

Note: The ov_cancel command is not supported in the OpenVault releases 1.x.

If you want to cancel a pending task request (for example, the desired cartridge is not available), use the cancel command (ov_cancel taskID), specifying the task by its ID number (as obtained with the ov_cancel command).

With the ov_cancel command, you can also send an explanation to the task that originated the task request, explaining why the operation is being canceled:

ov_cancel -r "reason for cancellation" 

Tip: If the string contains spaces, enclose it in quotation marks.

Managing Devices

Sometimes the operator needs to step in and manually control a device to perform a task (such as taking a drive offline so it can be cleaned). This section describes some tasks the operator can perform to manage devices.

A device (a library or drive) is specified by its device name, which is the name used in the configuration file (see “Setting Up Drives” in Chapter 4, and “Setting Up Libraries” in Chapter 4).

Disabling and Enabling Devices

You can temporarily disable a device to take it offline for a period of time in case servicing is necessary, such as when a drive needs cleaning. Permanently disabling a device may be necessary if it is malfunctioning and repairs need to be performed.

When the device is disabled, either temporarily or permanently, all communication to it is stopped and the OpenVault system considers it unavailable.

The following commands disable and then enable the device:

  • To temporarily disable a drive and a library:

    ov_drive -T name 
    ov_library -T name 

  • To permanently disable a drive and a library:

    ov_drive -D name 
    ov_library -D name 

  • To enable a drive and a library:

    ov_drive -E name 
    ov_library -E name 

Cleaning a Drive

Note: Cleaning facilities are not supported in OpenVault release 1.x, and the ov_clean command is not included.

OpenVault helps monitor a drive's cleaning schedule by tracking the dates a drive has been cleaned and the number of read/write errors occurring on the drive. The ov_clean command will help find and load a cleaning cartridge, if one is available.

Drives are specified by the name recorded in the client configuration file (see “Setting Up Drives” in Chapter 4):

  • To display the cleaning information for a drive:

    ov_clean -i -d driveName 

  • To check whether a cleaning cartridge is available and which cartridge will be used if a cleaning cartridge is not specified:

    ov_clean -n -d driveName 

  • To perform the cleaning operation, using the cleaning cartridge OpenVault selects:

    ov_clean -d driveName 

  • To perform cleaning, using a particular cleaning cartridge, specified by PCL:

    ov_clean -d driveName PCL 

Performing Occasional Tasks

This section describes the tasks that you probably perform occasionally, generally to provide organization for your cartridge storage and keep the OpenVault catalog synchronized with the movement of your cartridges and libraries. The OpenVault catalog tracks the location and status of all cartridges it is aware of.

Removing Cartridges from Libraries

When you want to remove a cartridge from a library (also known as ejecting), use the ov_eject command. The OpenVault catalog entry for that cartridge is not removed and all record of the cartridge is saved. The cartridge is either ejected (if the library can perform an eject) or an operator message is sent to the console, indicating to the operator that the cartridge can be physically removed. After a cartridge is ejected, it must be injected again (using ov_inject) before it can be used.

The following options can be used when ejecting a cartridge from a library:

  • Eject a cartridge using its PCL (default):

    ov_eject -BPCL

  • Eject a cartridge using its location (library, slot, and bay, if bays are present):

    ov_eject -l libraryName -s slotNumber -b bayName 

Moving Cartridges within Libraries

Note: Cartridge move is not supported in OpenVault release 1.x; that is, the ov_move command is not supported. To move cartridges within a library or between libraries, first eject them and then inject them into the library. See the ov_eject(1M) and ov_inject(1M) man pages for more information.

Occasionally you may want to reorganize cartridges in a library. For example, you may decide to group cartridges by application or to move them closer to their assigned drive.

Before moving any cartridges, it is helpful to generate a listing showing the contents of slots in the library. This should help you determine which slot addresses are immediately available for use and which cartridges may have to be moved to obtain their slot. The format of the slot address is specific to the LCP in use. To obtain a library slotmap:

ov_stat -s -L library 

When using the ov_move command, you can specify cartridges by their PCL or by their location in the library.

  • Move a cartridge using its PCL:

    ov_move PCL destinationSlotAddress 

  • Use the library location (including slot ID) instead of the PCL:

    ov_move -L libraryName originalSlotAddress destinationSlotAddress 

Maintaining the Server Catalog

The OpenVault server catalog tracks the location and details of each cartridge known to the OpenVault system and the up or down status of the drives and libraries. Occasionally, you may need to step in and make some corrections to the catalog to update it.

Recycling Cartridges

When you want recycle a cartridge in OpenVault system for use by another application, use the ov_recycle command. All information relative to cartridge use (such as number of reads and writes) remains in the OpenVault catalog.

  • Recycle the cartridge:

    ov_recycle -r -B PCL 

  • Recycle the cartridge, using its cartridge ID:

    ov_recycle -r -C cartID 

  • Recycle all cartridges owned by the given application:

    ov_recycle -r -A application 

Destroying Cartridges

When you want to completely remove a cartridge from the OpenVault system, for example to destroy a cartridge when it is generating I/O errors at the end of its life cycle, use the ov_purge command, which erases the cartridge entry from the OpenVault catalog.

  • Remove the cartridge entry, using its cartridge ID:

    ov_purge -C cartID 

  • Suppress the interactive verification; immediately remove the cartridge entry:

    ov_purge -f -C  cartID 

    Note: Use the ov_purge command sparingly, because important usage information is lost forever.