Phil for Humanity Phil for Humanity
A Guide for the Survival of Humankind and Helping the World, Society, and Yourself.



ClearCase Support: How to Replicate a VOB


Here are the procedures for replicating or MultiSiting a VOB from one ClearCase region to another ClearCase region. These ClearCase regions can be in different buildings, sites, or even countries, but they must be on the same network. These instructions are split into three parts. The first part of these instructions is for the ClearCase administrator to export a local copy of the VOB. The second part of these instructions is for another ClearCase administrator to import this VOB onto their servers. Finally, the third part is the final tasks for both administrators at both sites.
  1. First, you will need this information before replicating a VOB.

    • VOB Tag: You first need to know the name of the VOB that will be exported. I strongly recommend keeping the same VOB tag on all sites that have this VOB.
    • Destination Site: Get the location of the ClearCase where this VOB will be replicated to.

    • Destination Site's ClearCase Administrator: Throughout these procedures, it will be required to contact the ClearCase administrator at the remote site.
  2. Second, determine the VOB's current location and the VOB server that hosts the VOB by using this command.

    cleartool describe vob:VOB_TAG

  3. Log into the VOB's server as root.

    rlogin SERVER_NAME -l root
  4. If the local VOB replica has never been replicated to another site, then the default replica name is "original" for this master replica. Therefore, we are going to first rename this replica with these commands. First, determine the local VOB replica name using this command.

    cleartool lsreplica –invob VOB_TAG

    If the replica name is "original", then rename the replica name with these commands.

    multitool rename replica:original@vob:VOB_TAG replica:NEW_REPLICA_NAME@vob:VOB_TAG
    multitool chreplica –host HOST_NAME replica:NEW_REPLICA_NAME@vob:VOB_TAG


    I recommend the new replica name include the site name and the VOB tag name. For instance, if the VOB tag is "tools" and the region name is "1", then a good VOB replica name could be "region_1_tools".
  5. Determine the replica name for the new copy of the VOB. For instance, if the VOB tag is "tools" and the region name that the VOB is being sent to is "5", then a good VOB replica name could be "region_5_tools".
  6. Determine the VOB size. Keep in mind, only 3 data pools (administration data, VOB database, and source pool) will be exported to the remote site. The other 2 data pools (cleartext pool and derived object pool) are temporary local databases, thus will not be exported or count as the size of the VOB being exported. Therefore, subtract these data pools from the total VOB size.

    cleartool space VOB_TAG

    Furthermore, you will be making a copy of this entire VOB before exporting it, so you will need a temporary directory capable of storing this entire VOB. And the remote site will need the disk space to support this VOB too.
  7. At this point, contact the ClearCase administrator at the remote site. Provide the VOB TAG, new replica name, and VOB size. In return, the ClearCase administrator at the remote site will verify that they do not already have this VOB and will give you the host name (not the IP address) of the VOB server that will host this new VOB that has enough disk space for this VOB.
  8. Go to a temporary directory that has sufficient disk to store a copy of this VOB.

    cd TEMPORARY_DIRECTORY
  9. Now we are ready to export the VOB into a format that can be shipped to any other server using this command. Note that this command locks and unlocks the VOB, so users will not be able to make changes to this VOB when this command is running. This command may take a long time to run, depending on the size of the VOB and hardware speed. Therefore, it is recommended to run this command during non-business hours.

    multitool mkreplica –export –work ./tmp –maxsize 100m –vob VOB_TAG –out ./VOB_TAG.pkt REMOTE_HOST_NAME:REMOTE_REPLICA_NAME
  10. If the VOB size is large, then I recommend compressing the VOB packet files before shipping them. You can use zip, tar, etc. This is the ClearCase default compression method.

    tar –cf – VOB_TAG.pkt? | /usr/atria/etc/Gzip > TEMPORARY_DIR/VOB_TAG_#_tar.gz
  11. Now ship the VOB packet files that were created in the previous step. You can use ftp, blank CDs, etc., but this is the ClearCase default method that can be run for each packet file. Remember to only send the compressed files if created.

    /usr/atria/etc/mkorder –data PACKET_FILENAME -nc –fship –copy REMOTE_HOST_NAME
  12. At this point, notify the ClearCase administrator at the remote site that the VOB was exported to their site.




The remote ClearCase administrator now needs to import the exported VOB using these instructions.
  1. Log into the VOB server as root.

    rlogin SERVER_NAME -l root
  2. Go to the directory that has the sync packets or to the directory that the you copy the packets to. Copy the files to this directory if still necessary.

    cd DIRECTORY
  3. Import the VOB.

    multitool mkreplica –import –workdir ./tmp –tag VOB_TAG –vob VOB_STORAGE_DIRECTORY –public –password REGISTRY_PASSWORD –ignoreprot –npreserve –host VOB_SERVER –hpath VOB_STORAGE_DIRECTORY –gpath VOB_STORAGE_DIRECTORY ./FIRST_SYNC_PACKET_FILE
  4. Now that the VOB has been imported/created, set the permissions of this new VOB. First, you can see the existing permissions of the VOB at any time with this command:

    cleartool describe –vob vob:VOB_TAG

    To change the VOB owner and primary group, run this command:

    cleartool protectvob –force –chmod VOB_OWNER -chgrp PRIMARY_GROUP VOB_STORAGE_PATH

    You can also add and remove secondary groups using this command too:

    cleartool protectvob –force –add_group GROUP1,GROUP2 -delete_group GROUP3,GROUP4 VOB_STORAGE_PATH
  5. Next, set a View, mount the VOB, enter the VOB, and change the permissions of the directories in the VOB. I recommend permission numbers of either 770 or 775.

    cleartool setview VIEW_NAME
    cleartool mount VOB_TAG
    cd VOB_TAG
    cleartool protect –chown VOB_OWNER -chgrp PRIMARY_GROUP -chmod PERMISSION_NUMBER -recurse .

  6. Using the "Region Synchronizer" in the "ClearCase HomeBase" on any Windows computer that has ClearCase installed, synchronize or add this new VOB so any Windows computers can access it.
  7. At this point the VOB is ready to be used by any user, but I recommend first installing all required ClearCase triggers that your administrators' require. This step is optional.
  8. I strongly recommend mounting this new VOB on all shared servers. This step is optional too.




There are still a few more steps to follow on both sites.
  1. Start synchronization on both VOB servers so that changes to either VOB is replicated to each other. I personally like to use cron. Here is an example.

    0 1,3,5,7,9,11,13,15,17,19,21,23 * * * /usr/atria/bin/multitool syncreplica –export –nc –fship replica:VOB_REPLICA@vob:VOB_TAG

    0 0,2,4,6,8,10,12,14,16,18,20,22 * * * /usr/atria/bin/multitool syncreplica –import –vob VOB_TAG -receive

  2. Inform all users at the new site that the VOB is online and ready to be used.
  3. Finally, the ClearCase administrators at both sites can delete the synchronization packets created when the VOB was exported and later imported.

You are done replicating a VOB to another site.

by Phil for Humanity
on 20081021

Related Articles
 » ClearCase Support: How to Synchronize 2 VOBs
 » ClearCase Support: How to Delete a VOB Replica
 » ClearCase Support: How to Copy Data into a VOB