次の方法で共有


SetReplicationRelationship method of the MSFT_SMReplicationGroup class

Updates the relationship between replication groups.

Syntax

UInt32 SetReplicationRelationship(
  [in]            UInt16                                Operation,
  [in]            MSFT_SMReplicaPeer                REF TargetGroup,
  [in]            MSFT_SMStorageObject              REF SourceStorageObjects[],
  [in]            MSFT_SMStorageObject              REF TargetStorageObjects[],
  [in]            MSFT_SMStorageVolumeToReplicaPeer REF SyncPairs[],
  [in, optional]  String                                username,
  [in, optional]  String                                password,
  [out]           MSFT_SMJob                        REF Job,
  [out, optional] MSFT_SMExtendedStatus                 ExtendedStatus
);

Parameters

Operation [in]

The operation to perform on the replication relationship.

The possible values are:

Abort (2)

ActivateConsistency (3)

Activate (4)

AddSyncPair (5)

DeactivateConsistency (6)

Deactivate (7)

Detach (8)

Dissolve (9)

Failover (10)

Failback (11)

Fracture (12)

RemoveSyncPair (13)

ResyncReplica (14)

RestoreFromReplica (15)

Resume (16)

ResetToSync (17)

ResetToAsync (18)

ReturnToResourcePool (19)

ReverseRoles (20)

Split (21)

Suspend (22)

Unprepare (23)

TargetGroup [in]

A reference to the replica peer of target replication group.

SourceStorageObjects [in]

An array that contains references to the storage objects of the source replication group.

TargetStorageObjects [in]

An array that contains references to the storage objects of the target replication group.

SyncPairs [in]

An array that contains references to the objects that specify storage volume to replica peers assignments for the replication relationship.

username [in, optional]

The username used to authenticate the SMI-S provider.

password [in, optional]

The password used to authenticate the SMI-S provider.

Job [out]

If this operation is asynchronous, when this method returns, this parameter contains a reference to the object that represents the job; otherwise this parameter is set to NULL.

ExtendedStatus [out, optional]

When this method returns, this parameter contains a MSFT_SMExtendedStatus object that contains detailed status information about the results of this operation.

Return value

The possible return values are:

Success (0)

Not Supported (1)

Unspecified Error (2)

Timeout (3)

Failed (4)

Invalid Parameter (5)

Object Not Found (8)

Method Parameters Checked - Job Started (4096)

Access denied (40001)

There are not enough resources to complete the operation. (40002)

Cache out of date (40003)

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2016
Namespace
Root\Microsoft\Windows\Storage\SM
MOF
MsftStrgMan.mof
DLL
StorageService.dll

See also

MSFT_SMReplicationGroup