Changing preservation mode for a VOB family

You can change the preservation mode of a replica using the chreplica command.

About this task

Any subset of replicas in a VOB family can preserve identities and permissions. Within this set of replicas, the owner, group, and access mode of an object are kept the same across all the replicas. Adding a replica to or deleting it from the set has no immediate effect on the replica's objects. However, future changes to identities are propagated among all of the replicas in the VOB family that preserve identities and permissions. Future changes to permissions are propagated among all of the replicas that preserve identities and permissions or permissions only.

Note: On Linux® and the UNIX® system, preserving changes to identities across all sites is possible only if all sites support the same user-group accounts. On Windows®, ownership modes (SIDs) are not consistent across domains. Therefore, if all replicas in a VOB family are not in the same Windows domain, the entire set of replicas cannot preserve identities and permissions. You can preserve identities and permissions in a subset of replicas in the same domain. In a mixed environment, you cannot preserve identities and permissions on the entire set of replicas. For more information, see Identities and permissions strategy for VOB replicas.

To change a replica to be permissions-preserving or to create a new permissions-preserving replica, the VOB family feature level of the replica must be 4.

Also, note that the cleartool protect command fails if you use the -chmod option, specify an object in a permissions-preserving replica, and your client host is at feature level 3 or lower.

You can change the preservation mode of a replica in the following ways:
  • Identities- and permissions-preserving to nonpreserving or permissions-preserving. For example, if a replica was created incorrectly as identities- and permissions-preserving, you may need to change it.
  • Permissions-preserving to identities- and permissions-preserving.
  • Permissions-preserving to nonpreserving.
  • Nonpreserving to identities- and permissions-preserving. The replica will receive future changes to identities and permissions, but the original information is not restored.
  • Nonpreserving to permissions-preserving. The replica will receive future changes to permissions, but the original information is not restored.

Procedure

  1. At the master replica, change the replica property.

    On Linux, the UNIX system, or Windows, you can use the chreplica command.

    To change from identities- and permissions-preserving or permissions-preserving to nonpreserving:

    multitool chreplica –npreserve boston_hub@/vobs/dev
     Updated replica information for "boston_hub".
    

    To change from identities- and permissions-preserving to permissions-preserving:

    multitool chreplica –perms_preserve boston_hub@/vobs/dev
     multitool: Warning: Although replica now preserves only permissions, 
    existing objects may still reflect previous identities- and 
    permissions-preserving state.
    
    multitool: Warning: In a permissions-preserving replica, cleartool
    protect operations will fail on client machines running ClearCase
    versions associated with feature level 3 or lower.
    
    Updated replica information for "boston_hub".
    

    To change from permissions-preserving to identities- and permissions-preserving:

    multitool chreplica –preserve boston_hub@/vobs/dev
     multitool: Warning: Although replica now preserves identities and
    permissions, existing objects may still reflect previous 
    permissions-preserving state.
    Updated replica information for "boston_hub".
    

    To change from nonpreserving to identities- and permissions-preserving:

    multitool chreplica –preserve boston_hub@/vobs/dev
     multitool: Warning: Although replica now preserves identities and 
    permissions,existing objects may still reflect previous 
    non-preserving state.
    Updated replica information for "boston_hub".
    

    To change from nonpreserving to permissions-preserving:

    multitool chreplica –perms_preserve boston_hub@/vobs/dev
     multitool: Warning: Although replica now preserves permissions,
    existing objects may still reflect previous non-preserving state.
    multitool: Warning: In a permissions-preserving replica, cleartool 
    protect operations will fail on client machines running ClearCase
    versions associated with feature level 3 or lower.
    Updated replica information for "boston_hub".
    
    On Windows, you can use the Properties Browser to change this property:
    1. Display properties of the replica.
    2. Select the appropriate preservation mode.
    3. Click OK or Apply.

      If you change the replica to permissions-preserving or identities- and permissions-preserving, the appropriate warning is displayed (see the chreplica output above).

    For restrictions, see the chreplica reference page.

  2. If the changed replica is not self-mastering, export an update packet from the master replica to the changed replica.
  3. At the changed replica, import the update packet.

    If the import fails because the VOB group lists are different, use the cleartool protectvob command to add the missing groups to the importing VOB replica, and then try the import again. If the import succeeds, you can use the protectvob command to undo the group changes you made.

  4. (If the replica was changed to identities- and permissions-preserving) At the changed replica, use the cleartool protectvob command to set the owner, group, and group list of the VOB to be the same as the owner, group, and group list of the other identities- and permissions-preserving replicas in the VOB family.
  5. (If the replica was changed to nonpreserving) At the changed replica, use the cleartool protect command to change the ownership of all elements in the replica to the VOB owner at your site.

    For example, on Linux and the UNIX system, the following command finds all file and directory elements in /vobs/dev and executes the protect command:

    cleartool find /vobs/dev -all -type fd –exec 'cleartool protect –chown vobowner
    –chgrp vobgrp $CLEARCASE_PN' 
    

    On Windows, the following command finds all file and directory elements in \dev and executes the protect command:

    cleartool find \dev -all -type fd –exec "cleartool protect –chown vobowner 
    –chgrp vobgrp %CLEARCASE_PN%"