How to fix your fs_check errors in Rational Synergy
How do you fix errors which have been reported by file system check(fs_check) in IBM Rational Synergy?
fs_check command checks the file system archives for errors. To resolve the errors you need to repair the cache files for the problem objects. After repairing any cache files in your database you need to use
archive_fix to fix the archive files associated with cache files.
The usage of the
archive_fix command has changed over different releases. The following details how to run the
archive_fix command and how to prepare any required data.
[(/ort|/optimize_repair_time)|(/oas|/optimize_archive_space)] /p|/project projectspec...
Uses: You must be in the ccm_admin role to use this command.
Options and arguments
Specifies that the operation requires optimization to use less space on the server file system. However, this option can take longer to repair the archives. This is the default option.
Specifies that the operation can be optimized for the fastest repair time. However, this option uses more space on the server file system for the repair.
Specifies the object to be checked.
Specifies the project to be checked.
Prior to Release 7.2
or ccm archive_fix [-fast] -p project ...
or ccm archive_fix [-fast] -d dir ...
<input_file> is a text file containing a list of object names in the 4-part-name format (name-version:type:instance), with one object name per line.
The query format keyword “
-f %objectname” will display the 4-part-name, so you can populate an input file using a query.
% ccm query –t csrc –n foo.c –i 2 –u –f %objectname > input.txt
% ccm query –t incl –n bar.h –i 45 –u –f %objectname >> input.txt
% ccm query –t dir –n src –i 1 –u –f %objectname >> input.txt
<log_file>is the location where the output log is written. No file should already exist there.
archive_fix command rebuilds an existing archive for an object using the object’s cache file contents. It deletes the archive and uses the existing cache files to construct a new archive. For
ascii type objects, this means it requires cache files for all versions of the object so that it can reconstruct the complete delta within the archive.
A partially corrupt archive may still be used to extract the required missing cache files before running “ccm archive_fix”. For example, here is a simple object history:
The archive which contains all of the sources for these versions is in this path:
If the source for version 2 was somehow corrupt in this archive, we would need all 3 versions to rebuild it. If we have a good cache file for version 2, we can use it to rebuild the archive for that version, but if the cache files for versions 1 and 3 are missing, then it may still be possible to extract those 2 versions from the ‘bad’ archive as follows:
% ccm cat foo.c-1:csrc:2 > / dev/null
% ccm cat foo.c-3:csrc:2 > / dev/null
This should repopulate the database cache with the missing cache files, and now you can rebuild the entire archive as follows.
The cutoff_time option was introduced in release 7.1
- If a versioned object was recently checked in, but does not have an archive, the archiver has not yet processed the object. This is normal behavior and is not an error.
- If an object was checked in without an archive for a longer time than specified by a user, it is a possible problem because the archiver might not be running. You receive a warning.
- The ccm fs_check command has a new -c|-cutoff cutofftime option. Any object versions checked in before the cutoff time but not yet archived produce a warning. The default cutoff is two days, -2:0:0:0. You receive a warning for any files that were checked in earlier than the day before yesterday but have not yet been archived.
- After the archive is checked, the check for unused archive files now uses less memory than in Release 7.0 and earlier.
ccm archive_fix ” for older releases of Rational Synergy
In Rational Synergy 7.0 and later, the command can be run without any set-up steps, but for earlier releases you have to define the command.
In Rational Synergy 6.2, you will need to request a special library from Rational Client Support in order to run the
‘ccm archive_fix’ command. Although this release of Rational Synergy is no longer supported, the library can be provided if the check is being done as part of an upgrade to a supported release of Rational Synergy. In Rational Synergy 6.2, you need to load the library which you get from support, and define the command using the following steps:
% ccm set role ccm_admin
% ccm load -a archlib.a
% ccm define archive_fix fix fix_cmd
In Rational Synergy 6.3, 6.4 and 6.5, the required library is included with the client by default, and you will just need to define the command, as follows:
% ccm define archive_fix archive_fix fix_cmd
Using archive_fix to rebuild an archive.
For any object
Suitable when you have a large number of objects to fix.
- Create a text file containing all of the object versions that you want to re-archive, using their cache files, for example:
% cat input_file.txt
- Define “
ccm archive_fix” if required.
- Run “ccm archive_fix” using the input file created in step 1 and a new log file
% ccm archive_fix –i input_file.txt –l archive_fix.log
- Check the newly created archive_fix.log for any warnings or error messages when this has completed. If there are no problems, it will just contain the 4-part-names of the object versions which were fixed. If there are problems then report then to Rational Client Support.
- Re-run “
ccm fs_check” again to verify that the error has been resolved.
For Project Objects only
- ccm archive_fix [-fast] -p project...(Four-part name of the project)
Example: If the project name is "top" and the version is "int_20091118", run the query below:
ccm query -n top -v int_20091118 -f %objectname
ccm archive_fix -p top~int_20091118:project:su#1
Found 1 archives needing repair
Finished with 1 archives fixed
For Directory Objects only
- ccm archive_fix [-fast] -d dir ...(Four-part name of the project)
Example: If the directory name is "build" and the version is "5", run the query below:
ccm query -n build -v 5 -f %objectname
ccm archive_fix -d build~5:dir:nish#1
Found 1 archives needing repair
Finished with 1 archives fixed
More support for:
Software version: 6.3, 6.4, 6.5a, 6.5, 6.6a, 7.0, 7.1a, 7.1, 7.2
Operating system(s): AIX, HP-UX, Linux, Solaris
Reference #: 1624991
Modified date: 05 June 2013