4.3 Store Shadow Copies on a Different Volume

The following message sequence illustrates how a client can set up a shadow copy storage association on a server so that shadow copies for one volume are stored on another volume.

  1. The client requests to acquire an RPC binding handle to an IVssSnapshotMgmt interface by calling CoCreateInstanceEx with the class GUID that defines the COM class on the server that implements IVssSnapshotMgmt.

  2. The server returns a reference to the IVssSnapshotMgmt interface.

  3. The client calls IVssSnapshotMgmt::GetProviderMgmtInterface, passing in the required parameters as described in section 3.1.1.4.1.

  4. The server returns a reference to an IVssDifferentialSoftwareSnapshotMgmt interface.

  5. The client calls IVssDifferentialSoftwareSnapshotMgmt::QueryVolumesSupportedForDiffAreas, passing in the name of the original volume to be shadow copied, either selected as described in section 4.1 or determined through some other means external to this protocol.

  6. The server returns a reference to an IVssEnumMgmtObject interface that contains a collection of volumes on the server that can be used as shadow copy storage for the specified original volume. The server initializes an internal cursor in the collection to point to the first object.

  7. The client then iterates through the returned enumeration by calling IVssEnumMgmtObject::Next as in steps 5 through 8 of section 4.1 to make a decision on which volume, if any, to select to host the shadow copy storage.

  8. In each iteration, the server returns the appropriate volume in the collection as a VSS_MGMT_OBJECT_PROP structure, wrapping a VSS_DIFF_VOLUME_PROP structure, and increments the internal cursor in the collection to the next object until the client discontinues the iteration.

  9. The client calls IVssDifferentialSoftwareSnapshotMgmt::AddDiffArea, passing in the following parameters:

    • The name of the original volume passed to IVssDifferentialSoftwareSnapshotMgmt::QueryVolumesSupportedForDiffAreas.

    • The name of the shadow copy storage volume (the VSS_MGMT_OBJECT_PROP.Obj.DiffVol.m_pwszVolumeName member from the shadow copy storage volume selected in step 7).

    • The desired maximum size of the shadow copy storage in BYTEs.

  10. The server creates a new shadow copy storage association object between the two specified volumes of the specified size and returns S_OK to confirm that the new object was created.

  11. The client calls IVssEnumMgmtObject::Release.

  12. The server decrements the reference count for the IVssEnumMgmtObject interface and returns the new reference count to the client.

  13. The client calls IVssDifferentialSoftwareSnapshotMgmt::Release.

  14. The server decrements the reference count for the IVssDifferentialSoftwareSnapshotMgmt interface and returns the new reference count to the client.

  15. The client calls IVssSnapshotMgmt::Release.

  16. The server decrements the reference count for the IVssSnapshotMgmt interface and returns the new reference count to the client.

Store Shadow Copies on a Different Volume

Figure 3: Store Shadow Copies on a Different Volume