ccm fs_check

Use the ccm fs_check command to check the consistency of a Rational® Synergy database file system.

Synopsis

ccm fsck|fs_check
[-d|-dir directory_path] [-f|-fix] [-t|-type type]
[-c|-cutoff cutoffTime] [-v|-verbose] [-e|-empty_skip]
[-u|-unused_skip] [-nd|-no_duplicates] [-w|-windows]
[-nb|-null_byte] [-z|-zero_counts]

ccm fsck|fs_check
[-d|-dir directory_path] [-f|-fix] [-c|-cutoff cutoffTime]
[-v|-verbose] [-e|-empty_skip] [-u|-unused_skip]
[-nd|-no_duplicates] [-w|-windows] [-nb|-null_byte]
[-z|-zero_counts] object_spec...

Uses

By default, the ccm fs_check command checks that:

  • Every static file, project, or directory has an entry in the archive.
  • Every non-static file, project, or directory has an entry in the cache.
  • Every file in the cache area corresponds to an existing object version.
  • Every file in the archive area corresponds to one or more static object versions.
  • Every entry in an archive file corresponds to one static object version.
  • The source for a project or directory is empty.

Checking all the files in the cache and archive areas takes time and memory resources, and might be suppressed using the -u|-unused option.

Run ccm fs_check to check your entire database because this command can be used regularly to reduce the disk space taken up by cache files. However, as the check can take a long time on large databases, you can perform a quicker check by checking only specific types of objects. Use the -t option to check only objects of the specified type. Or check a list of objects using object_specs (for example, using query results). You cannot use both the -t option and a list of objects. If you check only objects of the specified type, checking for unused cache and archive entries are suppressed.

Also, direct the output to a file so that you can examine the results.

If unexpected or extra files or archive entries are found, they are reported individually and summarized at the end. However, such cases are not counted as errors and do not cause ccm fs_check to fail with a non-zero exit status.

The -fix option to ccm fs_check does not remove these extra entries. Doing so might lead to data loss in cases where you have created such files manually for your own purposes. Or where you have restored a file system and metadata backup taken at slightly different times. For assistance in removing unwanted extra cache and archive entries, contact IBM® Rational Software Support.

All users can perform this operation. However, you must be in the ccm_admin role to perform the -fix option. You must start a session (using the ccm start command) before running this command.

Controlled files are subject to asynchronous archiving when they are checked in to a static state. This process requires that you allocate one extra back-end session per database for asynchronous archiving. If you plan to run the archive conversion, you must also allocate one additional back-end session for the archive conversion. Also, when an object has not been archived, you receive a warning that the file has not been archived.

Options and arguments

-c|-cutoff cutoffTime
Specifies the cutoff time for the archive check. If object versions checked in before the cutoff time and they have not been archived, you receive a warning. The cutoffTime is converted to a date on the server. Absolute times are converted in the time zone and locale of the server. Relative times are relative to midnight in the time zone of the server. The default is -5:0:0:0 giving a relative time of five days before midnight in the time zone of the server.
-d|-dir directory_path
Specifies the directory into which inconsistent archive entries are written. By default, these files are written to database_path\st_root\tmp\check.
-e|-empty_skip
Suppresses warnings about empty files for static object versions.
This warning can also be suppressed for individual object versions. Create a Boolean attribute deliberately_empty with the value TRUE on the object versions for which you want to suppress the warnings.
-f|-fix
Fixes some simple errors, such as:
  • If you unpack a database from a pack file created on UNIX, it is likely that cache files are in UNIX format. If this newline style is the only difference between the cache and the archive, the -f|-fix flag causes the cache file to be deleted.
  • If the cache f is zero length, but the archived content is not, the
    -f|-fix flag causes the cache file to be deleted.
  • If the cache file has the wrong modify time, but is equal in content to the archive, use the -f|-fix option to update the modify time to be equal to the source_modify_time attribute.

    This option does not remove extra or redundant files. This option ensures that you can examine the content of such files to verify that they are not required before deleting them.

-nb|-null_byte
Checks in the source attribute for null (0x00) bytes. Generates a warning message when objects of type ascii and subtypes of ascii contain null bytes.
-nd|-noduplicates
Specifies to skip checks for duplicate archive entries. Use this option to reduce the memory resources used when checking large databases that might otherwise fail from lack of memory. Because it reduces the strength of archive checking, use only when necessary.
object_spec
Provides a list of objects to check. You can use query results for this argument.
You cannot use this argument with the -t option. Using this option implies the -u|-unused_skip option.
-t|-type type
Specifies the type of objects that should be checked. Use this option to reduce the memory resources used when checking large databases that might otherwise fail because of lack of memory. Since it reduces the strength of archive checking, it should be used only when necessary.
-u|-unused_skip
Specifies to skip checks for extra files and entries in the cache and archive files. This option does not remove or delete files or entries.
-v|-verbose
Generates more detailed information about each error. The errors report:
  • Objects with no source attributes, excluding problems and tasks. These objects have no cache or archive entries, and are skipped.
  • Files still archived by the old pre-4.1 archives (SCCS, compress, and RCS, not ccm_rcs). So, you must perform archive conversion.
  • Objects with no cache files. Such objects were probably affected by an earlier execution of ccm clean_cache.
  • Objects with no source_modify_time attributes. This issue is a minor error. Such objects have not been correctly upgraded to current database standards. You can create the source_modify_time attribute, of type time, and set it to the correct time; the time when the source file was last edited, before it was checked in. This time is the modify time on the cache file.
  • Object cache files with times earlier than their source_modify_times. This error is not serious and might have been caused by the failure of a call to set the cache file time. Fix this error by deleting the cache file after you have ensured that the archive entry is correct.
-w|-windows
Suppresses a warning message given when files differ only in carriage return characters.
-z|-zero_counts
Causes all counts to be printed, including those counts with zero values. This information can be useful when other programs analyze the output of fs_check.

Example

Check the file system consistency of the database and provide detailed output information.

  1. Log on as the Rational Synergy administrator.
  2. Check the file system consistency of the database.

    ccm fs_check -v


Feedback