Share via


CreateReplica method of the MSFT_SMReplicationGroup class

Creates a replica relationship between replication groups.

Syntax

UInt32 CreateReplica(
  [in]            string                      RelationshipName,
  [in]            uint16                      SyncType,
  [in]            uint16                      Mode,
  [in]            MSFT_SMReplicaPeer      REF TargetStorageSystem,
  [in, optional]  MSFT_SMReplicationGroup REF TargetGroupObject,
  [in]            MSFT_SMPool             REF TargetStoragePool,
  [in, optional]  MSFT_SMReplicationSettings  ReplicationSettings,
  [in]            UInt32                      RecoveryPointObjective,
  [out]           MSFT_SMReplicaPeer      REF TargetReplicaPeer,
  [in, optional]  String                      username,
  [in, optional]  String                      password,
  [out]           MSFT_SMJob              REF Job,
  [out, optional] MSFT_SMExtendedStatus       ExtendedStatus
);

Parameters

RelationshipName [in]

The name of the new replica relationship.

SyncType [in]

Indicates the type of copy to make.

The possible values are:

DMTF Reserved

0 5

Mirror (6)

Snapshot (7)

Clone (8)

TokenizedClone (9)

DMTF Reserved

10 32767

Vendor Specific

32768 ...

Mode [in]

The setting to use to update target elements. If this value is NULL, the system will specify this setting.

The possible values are:

Synchronous (2)

Update target elements synchronously.

Asynchronous (3)

Update target elements asynchronously.

Adaptive (4)

Dynamically switch between synchronous and asynchronous modes.

DMTF Reserved

Vendor Specific

TargetStorageSystem [in]

Indicates the replica target system to use when setting up a relationship of storage objects within the system.

TargetGroupObject [in, optional]

A MSFT_SMReplicationGroup object that specifies the target replication group to create.

TargetStoragePool [in]

An array that contains MSFT_SMPool objects that contain storage objects of the target replication group.

Note

If this parameter is specified, TargetStoragePool parameter must be set to NULL.

ReplicationSettings [in, optional]

A MSFT_SMReplicationSettings object that contains settings to apply to the replication relationship.

RecoveryPointObjective [in]

Indicates the maximum interval in which data from copy operations might be lost. For synchronous copy operations, this interval is "0". For asynchronous copy operations, this parameter represents the interval since the most recent transmission of data to the target element.

TargetReplicaPeer [out]

A MSFT_SMReplicaPeer object that specifies the association between the source replication group and the instance of the replication target.

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
Header
Adojet.h
MOF
MsftStrgMan.mof
DLL
StorageService.dll

See also

MSFT_SMReplicationGroup