IBM Support

Reducing the size of the string file for a ClearCase VOB

Question & Answer


Question

How can the size of the string file, vob_db.str_file, in a IBM® Rational® ClearCase® VOB be reduced?

Cause

Problems may arise when the string file (vob_db.str_file) in a VOB grows to larger than 2 Gigabytes. This technote explains how to reduce the size of the string file.

Answer

Information about shared derived objects (DO's) and their configuration records (CR's) are stored in the string file. To reduce the size of this file, you must remove the DOs. If the scrubber is successfully running every night and the string file is still at the 2 GB limit, then it will be necessary to be more aggressive about removing DOs by running the following commands:

  1. Run scrubber -e to remove all DO's with a zero reference count.
  2. If the scrubber log does not report many removed DO's, then it will be necessary to remove DOs manually. The preferred method is to go into each view that references a particular DO and remove it with a UNIX® rm command or the Windows® del command. This will decrement the reference count on that DO.
  3. After the DO's have been removed from all views that references the DO, run scrubber -e again.

If removal of DO's must be done more quickly (say, if the VOB is at the 2 GB limit) run the below script (these scripts are NOT supported and are merely used as an example of how this task could be accomplished). This will remove all DOs from all views.

Note: Once the DO's have been removed, file not found errors can be expected on subsequent builds. For more information on this, look at the cleartool rmdo man page under the CAUTION section.

Run the following script called remove_all_dos from within the VOB:

UNIX shell script:

#!/bin/ksh
# remove_all_dos
for file in `/usr/atria/bin/cleartool lsdo -recurse -short`


do /usr/atria/bin/cleartool rmdo -all $file
done

Windows batch file:

REM remove_all_dos

for /F %a in ('cleartool lsdo -recurse -short') do cleartool rmdo -all %a

Script Usage:

1.  Set into a view

2.  cd into a VOB

3.  Run the script

Attention:

  • For DO's already promoted to the VOB, this script will remove the CR and the data container.
  • For DO's that are unshared (view-private), the script will remove the CR only and the view storage data container will remain. The DO will then become a normal file system object and you can use a UNIX rm or the Windows® del command to remove if desired.

After running the above script, run scrubber -e. The space usage within the string file will be greatly reduced but there will not be a reduction in the size of the string file. The scrubber simply marks unused areas within the string file available for reuse. If disk space is a concern, you will need to run reformatvob.

If deleting all DO's is not desired, edit the lsdo line within the script to adjust accordingly.

For example, you can use cleartool lsdo -me to remove only DO's you have created.

[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Database","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF015","label":"IRIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"2003.06.16;2003.06.00","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Database","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21122951