Compartilhar via


SetReplicationRelationship method of the MSFT_SMStorageVolume class

Updates a replication relationship between virtual disks.

Syntax

UInt32 SetReplicationRelationship(
  [in]            UInt16                 Operation,
  [in]            MSFT_SMReplicaPeer REF TargetStorageVolume,
  [in, optional]  String                 username,
  [in, optional]  String                 password,
  [out]           MSFT_SMJob         REF Job,
  [out, optional] MSFT_SMExtendedStatus  ExtendedStatus
);

Parameters

Operation [in]

An integer that indicates 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)

(24)

TargetStorageVolume [in]

A MSFT_SMReplicaPeer object that ndicates the replica target system to use when setting up a relationship of storage objects within the system.

username [in, optional]

The username to use to authenticate the SMI-S provider. If this parameter is not set, the storage service will attempt to retrieve the credentials from the configuration provider.

password [in, optional]

The password to use to authenticate the SMI-S provider. If this parameter is not set, the storage service will attempt to retrieve the credentials from the configuration provider.

Job [out]

A reference to the MSFT_SMJob object that specifies a reference to a job if this method returns "Method Parameters Checked - Job Started". If this operation performs synchronously, this parameter is set to NULL.

ExtendedStatus [out, optional]

A MSFT_SMExtendedStatus object that specifies detailed status information about the result 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_SMStorageVolume