Share via


4.6 Adding a New Link to a Domainv2-Based DFS Namespace

The following example describes the steps used to add a new DFS link to an existing domainv2-based DFS namespace with two root targets. The illustration in this example also shows how the DFS root target uses NetrDfsSetInfo, Level parameter 101, and DFS_VOLUME_STATE_RESYNCHRONIZE, to update the DFS metadata of the domain-based DFS namespace with the new DFS link information, and then notifies the other root targets.

  1. A client issues a NetrDfsAdd RPC method to the DFS root target CFS-41X-2C02 for the domainv2-based DFS namespace.

  2. The DFS root target CFS-41X-2C02 performs either a full synchronization or an incremental synchronization. A full synchronization is performed if the DFS root target server is switching to a new PDC or if the DC that the synchronization operation is currently using is different from that in the <uSNChanged, DC invocation ID> tuple that was saved at the start of a previous full synchronization for the DFS namespace. An incremental synchronization is performed if the DFS root target server is already syncing with the PDC.

  3. An incremental synchronization is done by issuing an LDAP search operation for the DFS namespace LDAP entry subtree to determine whether in any of the object classes of msDFS-Namespacev2, msDFS-Linkv2, or msDFS-DeletedLinkv2 the uSNChanged is greater than the saveduSNChanged value, where saveduSNChanged is the uSNChanged value from the tuple <uSNChanged, DC invocation ID> that was saved previously.

  4. The DFS root target CFS-41X-2C02 determines that the DFS metadata in its cache is up-to-date and whether the new link points to another DFS namespace.

  5. DFS link target CFS-41X-2C02 issues an LDAP modify operation to the PDC with a new identity GUID (msDFS-LinkIdentityGUID) value and the updated DFS metadata that contains the new DFS link information. The link identity GUID is set at DFS link creation time and does not change for the lifetime of the LDAP entry. It is used to locate the in-memory data structure that corresponds to the DFS link in the DFS metadata cache.

  6. The LDAP modify operation is successful.

  7. The NetrDfsAdd method invoked by the client completes successfully.

  8. To perform a full synchronization to ensure that this is propagated to all other root targets, the DFS root target, which updated the DFS metadata, issues the NetrDfsSetInfo method, with the Level parameter 101 and the State field of DFS_INFO_101 set to DFS_VOLUME_STATE_RESYNCHRONIZE, to all of the other root targets. This is used to identify added or deleted DFS links. In this example, CFS-41X-2C02 is notifying CFS-41X-2C03.

  9. On receiving the NetrDfsSetInfo method with Level parameter 101 and DFS_VOLUME_STATE_RESYNCHRONIZE, CFS-41X-2C03 issues an LDAP search to the PDC to verify whether the DFS metadata in its cache is up-to-date. A different uSNChanged value from the <uSNChanged, DC invocation ID> tuple saved at the start of a previous full sync would indicate what has changed, and it would subsequently perform an incremental sync to propagate any DFS metadata change.

  10. CFS-41X-2C03 determines that the cached DFS metadata it has needs to be refreshed. It then issues an LDAP search operation to retrieve the attributes associated with the msDFS-Linkv2 class, which contains the actual DFS metadata.

  11. The LDAP search is successful and contains the DFS metadata in the reply.

  12. In this example, CFS-41X-2C03 performs the required changes to its local state by adding the new DFS link. The NetrDfsSetInfo method that CFS-41X-2C02 issued is then completed.

Adding a new link to a domainv2-based DFS namespace

Figure 7: Adding a new link to a domainv2-based DFS namespace