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.
- 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.
cleartool describe vob:VOB_TAG
rlogin SERVER_NAME -l root
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".
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.
multitool mkreplica –export –work ./tmp –maxsize 100m –vob VOB_TAG –out ./VOB_TAG.pkt REMOTE_HOST_NAME:REMOTE_REPLICA_NAME
tar –cf – VOB_TAG.pkt? | /usr/atria/etc/Gzip > TEMPORARY_DIR/VOB_TAG_#_tar.gz
/usr/atria/etc/mkorder –data PACKET_FILENAME -nc –fship –copy REMOTE_HOST_NAME
The remote ClearCase administrator now needs to import the exported VOB using these instructions.
- Log into the VOB server as root.
rlogin SERVER_NAME -l root
- 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.
- 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
- 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
- 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
cleartool protect –chown VOB_OWNER -chgrp PRIMARY_GROUP -chmod PERMISSION_NUMBER -recurse .
- 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.
- 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.
- 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.
- 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
- Inform all users at the new site that the VOB is online and ready to be used.
- 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