CreateGroupReplica method of the CIM_ReplicationService class
Create (or start a job to create) a new group of storage objects which are replicas of the specified source storage or a group of source storage objects (SourceElements). Note that using the input parameter, SyncType, this function can be used to instantiate the replicas, and to create an ongoing association between the source(s) and replicas. If 0 is returned, the function completed successfully and no ConcreteJob instance is created. If 4096/0x1000 is returned, a ConcreteJob is started, a reference to which is returned in the Job output parameter.
Syntax
uint32 CreateGroupReplica(
[in] string RelationshipName,
[in] uint16 SyncType,
[in] uint16 Mode,
[in] CIM_ReplicationGroup REF SourceGroup,
[in] CIM_LogicalElement REF SourceElement,
[in] CIM_ServiceAccessPoint REF SourceAccessPoint,
[in, out] CIM_ReplicationGroup REF TargetGroup,
[in] uint64 TargetElementCount,
[in] CIM_ServiceAccessPoint REF TargetAccessPoint,
[in] uint16 Consistency,
[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
-
RelationshipName [in]
-
A user relevant name for the relationship between the source and target groups or between a source element and a target group (i.e. one-to-many). If NULL, the implementation assigns a name. If the individual target elements require an ElementName, the implementation constructs an appropriate ElementName using the RelationshipName. For example, RelationshipName as a prefix followed by "_n" sequence number, where n is a number beginning with 1.
-
SyncType [in]
-
SyncType describes the type of copy that will be made.
-
DMTF Reserved
- 0 5
-
Mirror (6)
-
Snapshot (7)
-
Clone (8)
-
DMTF Reserved
- 9 32767
-
Vendor Specific
- 32768 65535
Mode [in]
Mode describes whether the target elements will be updated synchronously or asynchronously. If NULL, implementaton decides the mode.
Synchronous (2)
Asynchronous (3)
DMTF Reserved
Vendor Specific
SourceGroup [in]
A group of source storage objects which may be a StorageVolume or storage object. If this parameter is not supplied, SourceElement is required. Both SourceGroup and SourceElement shall not be supplied.
SourceElement [in]
The source storage object which may be a StorageVolume or storage object. If this parameter is not supplied, SourceGroup is required. Both SourceGroup and SourceElement shall not be supplied.
SourceAccessPoint [in]
Reference to source access point information. If NULL, service does not need access information to access the source element.
TargetGroup [in, out]
Optionally, as an input, refers to a target group to use. As an output, refers to the created target group (i.e., the replica group). If a job is created, the target group may not be available immediately. If TargetGroup is supplied, TargetElementCount shall be NULL.
TargetElementCount [in]
This parameter applies to one-source-to-many-target- elements. It is possible to create multiple copies of a source element. If TargetGroup is supplied, this parameter shall be NULL.
TargetAccessPoint [in]
Reference to target access point information. If NULL, service does not need access information to access the target element/group.
Consistency [in]
Overrides the default group consistency.
No Consistency (2)
Sequential Consistency (3)
DMTF Reserved
Vendor Specific
ReplicationSettingData [in]
If provided, it overrides the default replication setting data for the given SyncType. If not provided, the management server uses the default replication setting data.
Job [out]
Reference to the job (may be NULL if job is completed).
Synchronization [out]
Reference to the created group association between the source and the target elements. If a job is created, this parameter may be NULL until the association is actually formed.
TargetSettingGoal [in]
The definition for the SettingData to be maintained by the target storage objects (the replicas). If target elements are supplied, this parameter shall be NULL.
TargetPool [in]
The underlying storage for the target elements (the replicas) will be drawn from TargetPool if specified, otherwise the allocation is implementation specific. If target elements are supplied, this parameter shall be NULL.
WaitForCopyState [in]
Method must wait until this CopyState is reached before returning. Only a subset of valid CopyStates 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
-
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 4294967295)
Requirements
Minimum supported client |
None supported |
Minimum supported server |
Windows Server 2012 R2 |
Namespace |
Root\CIMv2\Storage\iScsiTarget |
MOF |
|
DLL |
|
See also
-
CIM_ReplicationService