Share via


CreateElementReplica method of the MSISCSITARGET_ReplicationService class

Creates or starts a job to create a new storage object that is a replica of the specified source storage object. This method can be used to instantiate the replica and to create an ongoing association between the source and the replica by using the SyncType input parameter.

This method overrides the method inherited from the CIM_ReplicationService class.

Syntax

uint32 CreateElementReplica(
  [in]      string                     ElementName,
  [in]      uint16                     SyncType,
  [in]      uint16                     Mode,
  [in]      CIM_LogicalElement     REF SourceElement,
  [in]      CIM_ServiceAccessPoint REF SourceAccessPoint,
  [in, out] CIM_LogicalElement     REF TargetElement,
  [in]      CIM_ServiceAccessPoint REF TargetAccessPoint,
  [in]      string                     ReplicationSettingData,
  [out]     CIM_ConcreteJob        REF Job,
  [out]     CIM_Synchronized       REF Synchronization,
  [in]      CIM_SettingData        REF TargetSettingGoal,
  [in]      CIM_ResourcePool       REF TargetPool,
  [in]      uint16                     WaitForCopyState
);

Parameters

ElementName [in]

Specifies a name that is meaningful to the end user for the element that is being created. If NULL, then a system-supplied default name can be used. The value is stored in the ElementName property for the created element.

SyncType [in]

Specifies the type of copy to be made. Required.

The possible values are.

DMTF Reserved

0 5

Mirror (6)

Snapshot (7)

Clone (8)

DMTF Reserved

9 32767

Vendor Specific

32768 = *value*

Mode [in]

Specifies whether the target elements is to be updated synchronously or asynchronously. If NULL, the implementation determines the mode.

The possible values are.

Synchronous (2)

Asynchronous (3)

DMTF Reserved

4 32767

Vendor Specific

32768 = *value*

SourceElement [in]

Specifies the source storage object that can be a MSISCSITARGET_StorageVolume or storage object. Required.

SourceAccessPoint [in]

Specifies source access point information. Can be NULL, if the service does not require access information to access the source element.

TargetElement [in, out]

On input, optionally specifies a target element to use. On return, contains a reference to the created target storage element, the replica. If a job is created, the target element might not be available immediately.

TargetAccessPoint [in]

Specifies target access point information. Can be NULL, if the service does not require access information to access the target elements.

ReplicationSettingData [in]

If provided, specifies the replication setting data for the given SyncType input parameter in the form of an embedded CIM_ReplicationSettingData instance. If not provided, the management server uses the default replication setting data. Optional.

Job [out]

On return, contains a reference to the job. Can be NULL, if the job is completed.

Synchronization [out]

On return, contains a reference to the created association between the source and the target element. If a job is created, this parameter can be NULL unless the association is actually formed.

TargetSettingGoal [in]

Specifies configuration-related and operational parameters for the target storage object, the replica. If a TargetElement parameter is supplied, this parameter must be NULL.

TargetPool [in]

Specifies the underlying storage for the target element if specified; otherwise the allocation is implementation-specific. If a TargetElement parameter is supplied, this parameter must be NULL.

WaitForCopyState [in]

Specifies the CopyState that must be reached before this method returns. Only a subset of valid values apply.

For example.

  • Initialized: Associations have been established, but there is no data flow.
  • Inactive: Initialization is complete, but the data flow remains idle until it is activated.
  • Synchronized: Replicas are an exact copy of the source.
  • UnSynchronized: Copy operation is in progress.

Return value

This method returns one of the following values.

Completed with No Error (0)

Not Supported (1)

Unknown (2)

Timeout (3)

Failed (4)

Invalid Parameter (5)

In Use (6)

DMTF Reserved (7 4095)

Method Parameters Checked - Job Started (4096)

Method Reserved (4097 32767)

Vendor Specific (32768 = value )

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2012 R2
Namespace
Root\CIMv2\Storage\iScsiTarget
MOF
SmIscsiTarget.mof
DLL
SMiSCSITargetProv.dll

See also

MSISCSITARGET_ReplicationService

MSISCSITARGET_StorageVolume