AIX operating systemsLinux operating systemsOracle Solaris operating systemsWindows operating systems

AUDIT CONTAINER (Verify the consistency of database information for a directory container)

Use this command to scan for inconsistencies between database information and a container in a directory-container storage pool.

You can use this command to complete the following actions for a container in a directory-container storage pool:
  • Scan the contents of a container to validate the integrity of the data extents
  • Remove damaged data from a container
  • Mark an entire container as damaged

Privilege class

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

Syntax

Read syntax diagramSkip visual syntax diagram
>>-AUDit CONTainer--+-container_name---------------------------------------------+-->
                    +-STGpool--=--pool_name--------------------------------------+   
                    '-STGpool--=--pool_name--STGPOOLDIRectory--=--directory_name-'   

   .-Action--=--SCANAll-----------.   
>--+------------------------------+----------------------------->
   '-Action--=--+-SCANAll-------+-'   
                +-REMOVEDamaged-+     
                +-MARKDamaged---+     
                '-SCANDamaged---'     

   .-MAXProcess--=--4------.  .-Wait--=--No------.   
>--+-----------------------+--+------------------+-------------->
   '-MAXProcess--=--number-'  '-Wait--=--+-No--+-'   
                                         '-Yes-'     

>--+------------------------+--+------------------------+------><
   '-LASTAUDITDate--=--date-'  '-LASTAUDITTime--=--time-'   

Parameters

container_name
Specifies the name of the container that you want to audit. If you do not specify this parameter, you must specify a directory-container storage pool.
STGpool
Specifies the name of the directory-container storage pool that you want to audit. This parameter is optional. If you specify only this parameter, all containers that are defined to the storage pool are audited. If you do not specify this parameter, you must specify a container.
STGPOOLDIRectory
Specifies the name of the container storage pool directory that you want to audit. This parameter is optional. If you specify this parameter, all containers that are defined to the container storage pool directory are audited. To specify this parameter, you must also specify a storage pool.
Action
Specifies what action the server takes when a container in a directory-container storage pool is audited. This parameter is optional. You can specify one of the following values:
SCANAll
Specifies that the server identifies database records that refer to data extents with inconsistencies. This value is the default. The server marks the data extent as damaged in the database.
Tip: If the damaged data extent was backed up on a directory-container storage pool on the target server, you can repair the data extent by using the REPAIR STGPOOL command.
REMOVEDamaged
Specifies that the server removes any files from the database that reference the damaged data extent.
MARKDamaged
Specifies that the server explicitly marks all data extents in the container as damaged.
SCANDamaged
Specifies that the server checks only the existing damaged extents in the container.
State reset condition: If the audit does not detect an error with a data extent that is marked as damaged, the state of the data extent is reset. The data extent can then be used. This condition provides a means for resetting the state of damaged data extents if errors are caused by a correctable problem. The SCANALL and SCANDAMAGED options are the only options that reset a damaged extent if it is found not to be damaged.
MAXProcess
Specifies the maximum number of parallel processes to use for checking a container in a directory-container storage pool. This parameter is optional. Enter a value in the range 1 - 99. The default value is 4.
Wait
Specifies whether the audit or verification operation is completed in the foreground or background. This parameter is optional. The following options are available:
No
Specifies that the operation is completed in the background. You can continue with other tasks when the command is processing. Messages that are related to the background process are displayed in the activity log file or the server console, depending on where the messages are logged. This is the default value.
Yes
Specifies that the operation is completed in the foreground. It might take a long time to complete the operation. The operation must complete before you can continue with other tasks. Messages are displayed in the activity log file or the server console, or both, depending on where the messages are logged.
Restriction: You cannot specify the WAIT=YES parameter from the server console.
LASTAUDITDate
Specifies that containers that are audited before the specified date are included in the audit. Audit containers based on the last audit date. This parameter is optional. Use the mm/dd/yyyy date format. If you specify this parameter you must also specify the LASTAUDITTIME parameter.
LASTAUDITTime
Specifies that containers that are audited before the specified time are included in the audit. Audit containers based on the last audit time. This parameter is optional. Use the hh:mm time format. If you specify this parameter you must also specify the LASTAUDITDATE parameter.

Example: Audit a specific storage pool container

Audit the 0000000000000721.dcf storage pool container.

audit container n:\ddcont2\07\0000000000000721.dcf action=scanall

Example: Remove damaged data from a directory-container storage pool

Audit a directory-container storage pool that is named NEWDEDUP and remove damaged files.
audit container stgpool=newdedup action=removedamaged

Example: Mark as damaged all of the data in a directory-container storage pool

Audit a directory-container storage pool that is named NEWDEDUP and mark all files as damaged.
audit container stgpool=newdedup maxprocess=2 action=markdamaged

Example: Audit a directory-container storage pool before a specific date and time

Audit a directory-container storage pool that is named POOL2 and only include containers before 1 May 2015 at 1.00 p.m.
audit container stgpool=pool2 lastauditdate=05/01/2015 lastaudittime=13:00
Table 1. Commands related to AUDIT CONTAINER
Command Description
MOVE CONTAINER Moves the contents of a storage pool container to another container.
QUERY DAMAGED Displays information about damaged files.