AUDIT LIBRARY (Audit volume inventories in an automated library)

Use this command to audit and synchronize volume inventories in an automated library.

When the AUDIT LIBRARY command is issued on a library client, the client synchronizes its inventory with the inventory on the library manager. If the library client detects inconsistencies, it corrects them by changing the ownership of the volume on the library manager.

When the AUDIT LIBRARY command is issued on a server where the library is SCSI, 349X, or ACSLS (LIBTYPE=SCSI, LIBTYPE=349X, or LIBTYPE=ACSLS), the server synchronizes its inventory with the inventory of the library device. If the server detects inconsistencies, it deletes missing volumes from its inventory.
  • In SCSI libraries, the server also updates the locations of volumes in its inventory that have been moved since the last audit.
  • In 349X libraries, the server also ensures that scratch volumes are in the scratch category and that private volumes are in the private category.

When the AUDIT LIBRARY command is issued on a server that is a library manager for the library (SHARED=YES), the server updates ownership of its volumes if it detects inconsistencies.

Regardless the type of server or type of library, issuing the AUDIT LIBRARY command does not automatically add new volumes to a library. To add new volumes, you must use the CHECKIN LIBVOLUME command.

Attention:
  • Running the AUDIT LIBRARY command under some conditions can cause tape volumes to be overwritten, which can lead to data loss. Use caution when you issue the AUDIT LIBRARY command on a library client or on a library that uses the SHARED library type.
    • If you run the AUDIT LIBRARY command on a server or library client that uses a shared library (LIBTYPE=SHARED), tape volumes with private status might be updated incorrectly or reassigned as scratch. This issue can occur when the library client has multiple library managers and you previously used the UPDATE DEVCLASS command to change the library name. After this library update, tape volumes that use the same device class might not exist in the new library. As a result, these volumes might be unintentionally converted to scratch.

    • If you run the AUDIT LIBRARY command on a library manager in a shared library environment, the command audits the tape library to synchronize the library inventory between the library and the server.

    • If you run the AUDIT LIBRARY command on a library client in a shared library environment, the command audits tape volumes in the storage pool that is associated with the tape library. The audit synchronizes tape volumes between the library client and the storage pool.

  • The following precautions apply to SCSI, 349X, and ACSLS libraries only (LIBTYPE=SCSI, LIBTYPE=349X, and LIBTYPE=ACSLS):
    • Running the AUDIT LIBRARY command prevents any other library activity until the audit completes. For example, the server will not process restore or retrieve requests that involve the library when the AUDIT LIBRARY command is running.
    • If other activity is occurring in the library, do not issue the AUDIT LIBRARY command. Issuing the AUDIT LIBRARY command when a library is active can produce unpredictable results (for example, a hang condition) if a process currently accessing the library attempts to acquire a new tape mount.

This command creates a background process that you can cancel with the CANCEL PROCESS command. To display information about background processes, use the QUERY PROCESS command.

Privilege class

To issue this command, you must have system privilege or unrestricted storage privilege.

Syntax

Read syntax diagramSkip visual syntax diagram AUDIT LIBRary library_name CHECKLabel=YesCHECKLabel=YesBarcodeREFRESHstate=NoREFRESHstate=NoYesALLOWLIBClient=NoALLOWLIBClient=NoYes

Parameters

library_name (Required)
Specifies the name of the library to audit.
CHECKLabel
Specifies how the storage volume label is checked during the audit. This parameter applies to SCSI libraries only. The parameter is ignored for other library types. The default is YES. Possible values are:
Yes
Specifies that the server checks each volume label to verify the identity of the volume.
Barcode
Specifies that the server uses the barcode reader to read the storage label. Using the barcode decreases the audit processing time. This parameter applies only to SCSI libraries.
Attention: If the scanner cannot read the barcode label or the barcode label is missing, the server loads that tape in a drive to read the label.
REFRESHstate
Specifies whether the server's information about a library, which is normally obtained during initialization, is refreshed, so that any changes in configuration are reflected. By setting the REFRESHSTATE parameter to Yes, this action is completed without having to restart the server or re-define the library. The default is No. Possible values are:
No
Specifies that the server does not refresh the library's state when the library is audited.
Yes
Specifies that the server does refresh the library's state when the AUDIT LIBRARY command is issued.
ALLOWLIBClient
Specifies whether the audit library can run on a library client or on a library with a SHARED library type. This parameter applies only to libraries with the SHARED library type.

When the ALLOWLIBClient parameter is set to Yes, the audit library can run on a library client to synchronize volume inventories between the library client and the library manager. In this case, the audit operation runs against the library with a SHARED library type that is defined on the library client. The default value is No. Possible values are:

No
Specifies that the server does not audit a library with a SHARED library type.
Yes
Specifies that the server performs the AUDIT LIBRARY operation on a library with a SHARED library type.

Example: Audit an automated library

Audit the EZLIFE automated library.
audit library ezlife

Related commands

Table 1. Commands related to AUDIT LIBRARY
Command Description
CANCEL PROCESS Cancels a background server process.
DEFINE LIBRARY Defines an automated or manual library.
DELETE LIBRARY Deletes a library.
DISMOUNT VOLUME Dismounts a sequential, removable volume by the volume name.
QUERY LIBRARY Displays information about one or more libraries.
QUERY LIBVOLUME Displays information about a library volume.
QUERY PROCESS Displays information about background processes.
UPDATE LIBRARY Changes the attributes of a library.