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.
- 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.
- 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.
- Verify that the VOB was recently and successfully backed up just in case.
- 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.
-
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
- 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.
- After a few days of the VOB working without any issues, it will be safe to delete the temporary directory created during reformatting.
-
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 03/30/2008