Chapter 15. Determining a Data Container's Location

This chapter demonstrates how to determine the actual storage locations of MVFS files—those accessed through VOB directories. Both standard UNIX tools and the ClearCase mvfsstorage utility are used.

Scenario

Let's focus on three files within VOB directory /proj/monet/src, as seen through view allison_vu:

  • Element cmd.c has element type text_file, and is currently checked-out.

  • Element monet.icon has element type file, and is not currently checked-out.

  • File ralph_msg is a view-private file, created by saving an electronic mail message to disk.

Determining the ClearCase Status of Files

The describe command verifies that the three files are as described above:

% cleartool describe cmd.c monet.icon ralph_msg
version "cmd.c@@/main/CHECKEDOUT" from /main/6 (reserved)
  checked out 03-Feb-93.20:40:30 by ([email protected])
  by view: "phobos:/usr/people/arb/view_store/arb.vws"
  element type: text_file

version "monet.icon@@/main/1"
  created 03-Feb-93.20:17:04 by ([email protected])
  element type: file

View private file "ralph_msg"
  Modified: Wednesday 02/03/93 21:39:49

Determining the Full UNIX Pathnames of Files

The standard ls(1) and pwd(1) commands show the full pathnames of the files, from UNIX's point of view:

% ls -l `pwd`/cmd.cex
-rw-rw-r--   1 allison  mon     211 Feb  2 12:03 /proj/monet/src/cmd.c

% ls -l `pwd`/monet.icon
-r--r--r--   1 allison  mon     266 Feb  3 20:17 /proj/monet/src/monet.icon

% ls -l `pwd`/ralph_msg
-rw-rw-r--   1 allison  mon     852 Feb  3 20:40 /proj/monet/src/ralph_msg

Where is the VOB?

The UNIX ls command provides no clue as to where the VOB is mounted. It might be mounted at /proj, or at /proj/monet, or at /proj/monet/src. The describe command provides the answer:

% cleartool describe -vob /proj/monet/src
versioned object base "/proj/monet"
  created 01-Feb-93.17:35:03 by ([email protected])
  VOB storage remote host:path
    "sol:/usr/vobstore/monet.vbs"
  VOB storage local pathname "/net/sol/vobstore/monet.vbs"
  VOB ownership:
    owner vobadm
    group vobadm

This command shows that the VOB is mounted at /proj/monet. In addition, it shows the local pathname to the VOB storage area. This looks like an automount(1M) pathname:

/net/sol/vobstore/monet.vbs
   (storage area is located on host sol)
   (pathname of VOB storage area on host sol)

To make sure, another mount command verifies the location of the VOB storage area:

% /etc/mount | grep vobstore
 .
 .
sol:/usr/vobstore on /tmp_mnt/net/sol/vobstore type nfs ...

This command shows explicitly that the VOB storage area is located with directory /usr/vobstore on host sol.

Where is the View?

The pwv (“print working view”) and lstag (“list view-tag”) commands show the location of the view storage area:

% cleartool pwv
Working directory view: allison_vu
Set view: allison_vu

% cleartool lstag allison_vu
* allison_vu /net/phobos/usr/people/arb/view_store/arb.vws

As in the preceding section, you might need to use another mount command to identify the host on which the view storage area resides (“which host contains directory /net/phobos”?).

Where are the Individual Files?

The data containers for all MVFS files are logically stored within a VOB or view storage area, as shown in Table 15-1.

Table 15-1. Storage Locations of MVFS Files

Kind of File

Storage Location

version (checked-in)

VOB source storage pool
(and perhaps VOB cleartext storage pool, also)

checked-out version

view-private data storage

unshared derived object

view-private data storage

shared derived object

VOB derived object storage pool

view-private file

view-private data storage

The following sections show how the mvfsstorage utility indicates the exact storage location of an MVFS file. This utility is located in directory /usr/atria/etc, a directory that is not typically on your search path. Thus, you may need to invoke mvfsstorage using a full pathname, as in the examples below.

Locating a Checked-Out Version

mvfsstorage shows the location in view-private data storage of the checked-out version of text_file element cmd.c:

% /usr/atria/etc/mvfsstorage cmd.c
/net/phobos/usr/people/arb/view_store/arb.vws/.s/
80000002.VOB/8000000B.00B0.cmd.c

Locating a Checked-In Version's Cleartext Container

For a checked-in version of a text_file element, mvfsstorage shows the location of the cleartext data container into which the type manager extracts the version:

% /usr/atria/etc/mvfsstorage cmd.c@@/main/1
/net/sol/vobstore/monet.vbs/c/cdft/28/32/
8a1a9a50010e11cca2ca080069021822

% /usr/atria/etc/mvfsstorage cmd.c@@/main/2
/net/sol/vobstore/monet.vbs/c/cdft/3a/33/
8e4a9a54010e11cca2ca080069021822

Locating a Checked-In Version's Source Container

For a checked-in version of a file element, mvfsstorage shows the location of the data container in the source pool:

% /usr/atria/etc/mvfsstorage monet.icon
/net/sol/vobstore/monet.vbs/s/sdft/26/4/
474fa2f4021e11cca42f0800690605d8

ClearCase does not maintain cleartext versions of file elements, or any other element type for which the cleartext of a version is stored in its source pool data container. Instead, programs access the data container in the source pool directly.

Locating a View-Private File

Like a checked-out version, a view-private file is located in a view's private data storage:

% /usr/atria/etc/mvfsstorage ralph_msg
/usr/people/arb/view_store/arb.vws/.s/
80000002.VOB/8000000C.00BD.ralph_msg

Non-Local Storage

The mvfsstorage utility shows the logical location of data containers within VOB and view storage directories. But VOB storage pools can be located outside the VOB storage directory itself; likewise, a view's private storage area can be located outside the view storage directory.

If mvfsstorage indicates that a data container is in a non-default VOB storage pool, use the lspool command to determine the location of the pool. The default pools are sdft (default source pool), cdft (default cleartext pool), and ddft (default derived object pool). For example:

% /usr/atria/etc/mvfsstorage hello.h
/vobstore/monet.vbs/c/clrtxt.1/36/f/6b6ed22b08da11cca0ef0800690605d8
    (clrtxt.1 is a non-default cleartext pool)
% cleartool lspool -l clrtxt.1
pool "clrtxt.1"
 08-Feb-93.10:25:46 by ([email protected])
  "nonlocal cleartext storage for monet VOB"
  kind: cleartext pool
  pool storage remote host:path "sol:/netwide/public/ccase_pools/clrtxt.1"
  pool storage local pathname "/vobstore/monet.vbs/c/clrtxt.1"
  maximum size: 0  reclaim size: 0  age: 96

Use UNIX ls to determine whether a view's private storage area (subdirectory .s) is nonlocal:

% ls -ld ~jones/view_store/temp.vws/.s
lrwxrwxr-x   1 jones    dvt        34 Feb 17 17:06
/usr/people/jones/view_store/temp.vws/.s -> /public/jones_temp

Links and Directories

The discussion above omitted links and directories. Briefly:

  • For a link, mvfsstorage indicates the storage location of the object to which the link points. This applies to all links: view-private hard links and symbolic links, VOB hard links, and VOB symbolic links.

  • A view-private directory does not have a data container; nor does a directory element. In both cases, mvfsstorage simply echoes the directory name.