Phil for Humanity Phil for Humanity
A Guide for the Survival of Humankind and Helping the World, Society, and Yourself.

ClearCase Support: How to Scrub a ClearCase VOB

If one of your ClearCase VOBs is too slow or stopped working because it is full, then it might be time for you to scrub your VOB. Here are the steps to determine if you need to scrub your VOB and how to scrub your VOB.
  1. First, verify the VOB needs scrubbing by executing these commands as root or the VOB owner on the VOB server. First, go to the VOBís Database (DB) storage directory like this:

    cd VOB_PATH/db

    If any DB files are over one gigabyte in size, then run this tool to see how full the DB String File(s) actually are.

    /usr/atria/etc/utils/countdb vob_db

    If you have a lot of DB files, then you may need to run the program like this:

    /usr/atria/etc/utils/countdb vob_db.*

    The "maximum records used" field is the most important output. If it is at 100%, then the VOB DB String File is full and you have to scrub the entire VOB. Otherwise, no one will be able to make changes to the VOB. I recommend scrubbing the VOB if the "maximum records used" is over 90%. If all the VOB DB String Files are less than 90%, then I do not recommend scrubbing your VOB. However, scrubbing your VOBs wonít hurt them yet may significantly improve their performance.

    Furthermore, you may want to periodically check how full your VOB DB String Files are on all of your VOBs to ensure minimal downtime and peak performance.
  2. The next step is to delete as many Views as possible. Some ClearCase Views have derived objects (D.O.s) that are promoted to the VOB Database. Deleting these Views will free up memory in the VOBís DB String Files. At the very least, you can delete Views from de-activated and deleted accounts. Also, you can contact all of your users to have them delete their Views that they no longer need. Read these instructions if you need help removing Views.
  3. Logged in as root or the VOB owner, scrub the VOB using this command:

    /usr/atria/etc/vob_scrubber VOB_PATH

    This command may take a long time to finish running.. possibly days or just a few minutes. This command will "remove event records and oplog entries from VOB database." In other words, temporary data within the database will be freed up; however disk space usage will not decrease.
  4. Re-execute the first step again. If the VOB DB String Files did not noticeably and significantly decrease, then your VOBís configuration will need to be modified to keep oplogs for a shorter period of time. Oplogs are temporary history data packets used for ClearCase MultiSite between VOB replicas. By default, oplogs are kept forever. I recommend changing this value to 60 days. This means if synchronization is broken for longer than 60 days, then it will be impossible to re-synchronize two replicas. After 60 days of no synchronization, you will have to send a new replica to continue MultiSiting this VOB. If the VOB has never been MultiSited, then you can probably skip this step.

    Edit this configuration file. By default, this file may not exist.


    Change or add this line in this configuration file:

    oplog -keep 60

    WARNING: Do not lower this oplog number too low.
  5. Since youíve changed the oplog retention configuration, re-execute Step #3 to delete the old oplogs in the VOBís DB String Files. Afterwards, you may also want to re-execute Step #1 to verify that the VOBís DB String Files have more free space.
  6. Now that there are large sections of the VOB DB String Files that have been freed up, this next command "removes data containers from VOB storage pools and removes D.O.s from VOB database". Basically, the next command will remove all derived objects and config records from the VOBís DB tables. This is temporary data that ClearCase can automatically recover if needed, yet may cost significant processing time.

    /usr/atria/etc/scrubber -e VOB_PATH

    This command should only take a few minutes to execute.
  7. All of the previously VOB scrubbing commands only cleaned up internal space within the VOB Database Files, however these commands did not reclaim any unused disk space. In order to free up disk space on the VOBís partition, you must defragment or reformat the VOB. This step is optional, unless you are running out of disk space on the VOBís partition or hard drive. Read these instructions if you need assisting defragmenting VOBs.

by Phil for Humanity
on 03/30/2008

Related Articles
 » ClearCase Support: Automate Checking of ClearCase Server Log Files
 » ClearCase Support: How to Display Config Records
 » ClearCase Support: Advanced Config Specs (Part 2)