PreviousNext

Deleting a Directory Replica

If a directory is replicated, all the replicas have to be deleted individually. Then the directory can be deleted using the commands described in the previous topic.

To display a list of all replicas of a directory, use the dcecp utility's directory show command. Look at the CDS_Replicas attribute of the directory in the list. Each replica's CDS_Replicas attribute has several sub-attributes. Look at the CH_Name sub-attribute for each replica to get the name of the clearinghouse where it is located. For example:

dcecp> directory show /.:/sales

{RPC_ClassVersion {01 00}}

{CDS_CTS 1994-05-06-11:41:05.314-05:00I0.000/08-00-09-25-13-52}

{CDS_UTS 1994-06-21-03:06:08.842-05:00I0.000/08-00-09-25-13-52}

{CDS_ObjectUUID 5f97a584-bf9b-11cd-9362-080009251352}

{CDS_Replicas

{{CH_UUID de3401e6-bb98-11cd-aac5-080009251352}

{CH_Name /.../absolut_cell/absolut_ch}

{Replica_Type Master}

{Tower {ncacn_ip_tcp 130.105.5.93}}

{Tower {ncadg_ip_udp 130.105.5.93}}}}

{CDS_AllUpTo 23854-01-29-19:45:44.841-05:00I0.000/08-00-09-25-13-52}

{CDS_Convergence medium}

{CDS_ParentPointer

{{Parent_UUID df13b228-bb98-11cd-aac5-080009251352}

{Timeout

{expiration 1994-08-24-19:30:30.827}

{extension +1-00:00:00.000I0.000}}

{myname /.../absolut_cell/sales}}}

{CDS_DirectoryVersion 3.0}

{CDS_ReplicaState on}

{CDS_ReplicaType Master}

{CDS_LastSkulk 1994-01-29-19:45:44.841-05:00I0.000/08-00-09-25-13-52}

{CDS_LastUpdate 1994-06-21-03:06:08.842-05:00I0.000/08-00-09-25-13-52}

{CDS_Epoch 60ac0730-bf9b-11cd-9362-080009251352}

{CDS_ReplicaVersion 3.0}

dcecp>

The name of the directory and the name of the clearinghouse can be used to uniquely identify each replica. Use these names in a series of directory delete commands to remove the replicas. The name of each replica is the argument to the command and the name of the clearinghouse should be used as the value of the -clearinghouse option. The -replica option should also appear in the command line to indicate that the directory to be deleted is a replica. An example command line is the following:

dcecp> directory delete /.:/sales -replica -clearinghouse /.:/NY1_CH
dcecp>

Note: The directory delete command does not require that directory replicas are empty in order to operate on them. It will delete the replicas, all their contents, and their child directories immediately, without prompting for confirmation of the operation.

You may want to write a dcecp script that looks at the CDS_Replicas attribute, finds all the replicas and deletes them with one command. See Part 1 of this guide for a discussion of writing scripts.