Deleting a Replica


This section describes how to remove a replica. You must complete all steps; if you do not, synchronization and mastership problems can occur in other replicas in the family.

When you remove a replica, the replicas in its family stop tracking epoch numbers for that replica. Removing a replica does not delete the database.

Removing a replica requires two synchronization cycles: one to transfer mastership of all of the replica’s objects to another replica, and one to inform all other replicas that the removed replica is no longer participating in the update process. Because this information can be communicated only through the synchronization process, you cannot remove a replica at its own site, because doing so prevents the replica from creating update packets.

After a replica is removed from a family, it no longer participates in synchronization activities and MultiSite information is not tracked. The replica no longer updates its oplog, and you cannot transfer mastership of any object in that replica.

Removing a Functioning Replica from a Clan

To remove a replica that is still accessible and functioning, perform the following steps. The example syntax shows how to remove the replica in the DOC family at site tokyo and decommission the site named tokyo for a clan that also includes sites sanfran_hub and boston_hub (which contains the working schema repository). Each command must be entered on a single physical line.

  1. Stop all work on the replica to be removed. Import all update packets.
  2. Transfer mastership of all objects to another replica.
  3. At site tokyo, run this command:

    multiutil chmaster -clan telecomm -site tokyo -family DOC -user masako 
    -password secret boston_hub -all -long 

    If the chmaster command reports errors, fix them and run the command again.

  4. If you are decommissioning the entire site, you must also transfer mastership of users and groups in the site’s schema repository.
  5. At site tokyo, run this command:

    multiutil chmaster -clan telecomm -site tokyo -family MASTR -user masako 
    -password secret boston_hub -all -long 

    If the chmaster command reports errors, fix them and run the command again.

  6. Send an update packet to the site receiving mastership.
  7. At site tokyo, run this command:

    multiutil syncreplica -export -clan telecomm -site tokyo -family DOC -user 
    masako -password secret -workdir c:\work -fship boston_hub 

    At site boston_hub, run this command:

    multiutil syncreplica -import -clan telecomm -site boston_hub -family DOC 
    -user susan -password passwd -receive 
  8. Send an update packet from the site receiving mastership to all remaining sites.
  9. At site boston_hub, run this command:

    multiutil syncreplica -export -clan telecomm -site boston_hub -family DOC 
    -user susan -password passwd -workdir c:\work -fship sanfran_hub 

    At site sanfran_hub, run this command:

    multiutil syncreplica -import -clan telecomm -site sanfran_hub -family DOC 
    -user jcole -password secret -receive 
  10. At the working schema repository site, run the rmreplica command. Be sure to include the final argument, which is the replica you want to remove.
  11. At site boston_hub, run this command:

    multiutil rmreplica -clan telecomm -site boston_hub -family DOC -user susan 
    -password passwd tokyo 
  12. If you are decommissioning the site, you must run rmreplica on its schema repository.
  13. At site boston_hub, run this command:

    multiutil rmreplica -clan telecomm -site boston_hub -family MASTR -user 
    susan -password passwd tokyo 
  14. Send an update packet from the working schema repository site to all other sites.
  15. At site boston_hub, run this command:

    multiutil syncreplica -export -clan telecomm -site boston_hub -family DOC 
    -user susan -password passwd -workdir c:\work -fship sanfran_hub 

    At site sanfran_hub, run this command:

    multiutil syncreplica -import -clan telecomm -site sanfran_hub -family DOC 
    -user jcole -password secret -receive 
  16. Remove the vendor databases for the replicas that were removed.

Note: Rational does not support the use of a database after it has been removed from a clan using rmreplica. Attempting to use such a database may result in data corruption.

Removing an Inoperable Site from a Clan

If you have a site whose databases have been damaged beyond repair or deleted without a backup, and you want to remove the site from the clan, perform the following steps. The examples show how to remove the replica in the DOC family at site tokyo and decommission the site tokyo from a clan that also includes sites sanfran_hub and boston_hub (which contains the working schema repository). Each command must be entered on a single physical line.

  1. Force the transfer of mastership of all objects from the unrecoverable replica to another replica.
  2. At site boston_hub, run this command:

    multiutil chmaster -clan telecomm -site boston_hub -family DOC -user admin 
    -password secret boston_hub -all -force tokyo 
  3. If you are decommissioning the site, force the transfer of mastership for all users and groups.
  4. At site boston_hub, run this command:

    multiutil chmaster -clan telecomm -site boston_hub -family MASTR -user 
    admin -password secret boston_hub -all -force tokyo 
  5. At the working schema repository site, run rmreplica to remove the unrecoverable replica. Be sure to include the final argument, the replica you want to remove.
  6. At site boston_hub, run this command:

    multiutil rmreplica -clan telecomm -site boston_hub -family DOC -user admin 
    -password secret tokyo 
  7. If you are decommissioning the entire site, run the rmreplica command to remove its schema repository.
  8. At site boston_hub, run this command:

    multiutil rmreplica -clan telecomm -site boston_hub -family MASTR -user 
    admin -password secret tokyo 
  9. Send an update packet from the site containing the working schema repository to all remaining sites.
  10. At site boston_hub, run this command:

    multiutil syncreplica -export -clan telecomm -site boston_hub -family DOC 
    -user admin -password secret -workdir c:\work -fship sanfran_hub 

    At site sanfran_hub, run this command:

    multiutil syncreplica -import -clan telecomm -site sanfran_hub -family DOC 
    -user admin -password secret -receive 
  11. Remove the vendor databases for the replica and schema repository that were removed.