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

ClearCase Support: How to Reformat or Defragment a ClearCase VOB

Reformatting a VOB is just like defragmenting a hard drive. The VOBís Database files will be re-sorted in a more compact and linear order to save disk space and decrease read time. On the other hand, reformatting a VOB may increase the time it takes to write to a VOB, since there will be fewer empty slots available for new data within the VOBís Database files. Reformatting a VOB is optional unless you are running out of disk space on the partition that the VOB storage directory resides on.

Here are the instructions for reformatting or defragmenting a VOB.
  1. Schedule a ClearCase downtime by asking all users to exit out of their accounts for a few hours or possibly even a day depending on the size of the VOB and the speed of the computer.
  2. Log onto the VOB server that has the VOBís storage directory as either root or the VOB admin account. I strongly recommend doing this on the console of the VOB server, because if anything interrupts the defragmenting of the VOB, then you will have to recover the VOB from backup.
  3. Verify that the VOB was recently and successfully backed up just in case.

  4. Make sure the VOB serverís temp directory (such as /tmp) has enough disk space to hold an entire copy of the VOB that you are about to reformat. Also make sure that the VOBís partition also has enough disk space to hold the entire copy of the VOBís DB. You can find out the size of a VOB and DB by using these instructions. You may be required to move other VOBs from this partition or increase the size of the partition in order to reformat the VOB.
  5. Reformat the VOB with this command:

    cleartool reformatvob Ėto NEW_TEMP_DIRECTORY VOB_PATH

    This command may make take a few minutes, a few hours, or maybe a day to complete. I typically estimate about 1 hour per gigabyte of the VOBís entire size. Make sure the temporary directory does not exist before running the command. An example of this command would be.

    cleartool reformatvob Ėto /tmp/reformat_temp_directory /vob_partition/test

  6. When the reformatting has completed, restart ClearCase on the VOB server by executing these instructions. I believe this is necessary to disconnect any ClearCase accounts that did not log off or Views that may still be active.
  7. After a few days of the VOB working without any issues, it will be safe to delete the temporary directory created during reformatting.
  8. After a few days of the VOB working without any issues, you will also have to manually delete the old DB pool/directory in the VOBís storage directory. The active version of the DB pool will usually be called "db", so donít delete this directory. The old DB pool to be deleted will be called "db_DEFRAG_DATE" such as "db_03_30".

    If something goes wrong with the reformatting of the VOB, you can restore the VOB using this old DB directory or from backup.

by Phil for Humanity
on 20080330

Related Articles
 » ClearCase Support: How to Duplicate a VOB
 » ClearCase Support: How to Move a VOB
 » ClearCase Support: How to Check ClearCase VOB Size