17.2 Dynamic Views

A dynamic view is an MVFS directory tree that enables dynamic access to VOB elements. Dynamic views contain nearly all the artifacts created during the software development process, whether or not they are under ClearCase control. These artifacts include the following:

View Root

Each dynamic view on a host exists as a directory under the view root directory. On UNIX computers, the default view root directory is /view. On Windows computers, the default view root directory is drive M.

In addition to the various view storage directories, the view root contains the special file .specdev. If this file is missing or damaged, attempts to access dynamic views on the host will generate this error message:

cleartool: Error: Unable to open file "viewroot": ClearCase object not found.

View Storage Directory

A dynamic view is implemented as a standard directory tree, whose top-level directory is termed the view storage directory. The directory contains these files and subdirectories, all of which are created and modified ClearCase commands and should never be modified in any other way:

.access_info

A file of view access event information that is periodically updated by the view server.

.pid

A one-line text file that lists the process ID of the view's view_server process.

admin

A directory that contains administrative data related to the amount of disk space a view is using. Use space -view to list this data.

config_spec

A file that stores the view's current config spec, in the form displayed by catcs.

.compiled_spec

A modified version of config_spec, which includes accounting information.

.identity

On UNIX, a subdirectory whose zero-length files establish the view's owner and group memberships.

identity.sd

On Windows, a security descriptor created for views stored in a FAT or FAT32 file system. Views stored in NTFS file systems include security descriptors in the file system ACL and do not need this file.

.s

A subdirectory that implements the view's private storage area.

db

A subdirectory containing the files that implement the view's embedded database.

.view

A file that lists the view's universal unique identifier (UUID) and other attributes


View-Private Storage

Subdirectory .s of the view storage directory is the root of a subtree that implements the view's
private storage area. On UNIX platforms, .s can be either a local directory or a UNIX symbolic link to a directory on another UNIX computer or Network Attached Storage device.

The private storage area holds several kinds of objects:

View Database

The view database subdirectory, db, contains these files, all of which are created and modified by ClearCase commands and should never be modified in any other way:

view_db.dbd

A compiled database schema, used by embedded DBMS routines for database access. The schema describes the structure of the view database.

view_db_schema_version

A schema version file, used by embedded DBMS routines to verify that the compiled schema file is at the expected revision level.

view_db.d0n
view_db.k01

Files in which the database's contents are stored.

vista.*

Database control files and transaction logs.

view_db.crs_file

Stores the configuration records of nonshareable and unshared derived objects. This file resides in subdirectory .s of the view storage directory, allowing it to be remote.

Compressed copies of the configuration records are cached in a view-private file, .cmake.state, located in the directory that was current when the build started. This speeds up configuration lookup during subsequent builds in the view.


The view database keeps track of the objects in its private storage area: view-private objects (files, directories, and links), checked-out versions, nonshareable derived objects, and unshared derived objects.

How a Dynamic View Selects Versions

A dynamic view provides transparent access to versions of elements. Each time you access an element, the view_server evaluates the view's config spec and selects a version of the element. It uses the following procedure for resolving element names to versions.

  1. User-level software (for example, an invocation of the C compiler) references a pathname. The ClearCase MVFS, which processes all pathnames within VOBs, passes the pathname to the appropriate view_server process.

  2. The view_server attempts to locate a version of the element that matches the first rule in the config spec. If this fails, it proceeds to the next rule and, if necessary, to succeeding rules until it locates a matching version.

  3. When it finds a matching version, the view_server selects it and has the MVFS pass a handle to that version back to the user-level software.

How a Dynamic View Manages Derived Objects

In addition to storing view-private files, a dynamic view's private storage area contains derived objects built in that view by clearmake (and, on Windows, omake). Nonshareable and unshared derived objects typically consume the most disk space in a view's private storage area. When a derived object is created, both its data container file and its configuration record are stored in the view. The first time the derived object is winked in to another view or promoted to the VOB, the view interacts with the VOB as follows: