CreateListReplica method of the CIM_ReplicationService class
Create (or start a job to create) new storage objects, which are replicas of the specified 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 and replica elements. If 0 is returned, the function completed successfully and no ConcreteJob instance created. If 4096/0x1000 is returned, a ConcreteJob is started, a reference to which is returned in the Job output parameter.
Syntax
uint32 CreateListReplica(
[in] string ElementNames[],
[in] uint16 SyncType,
[in] uint16 Mode,
[in] CIM_LogicalElement REF SourceElements[],
[in] CIM_ServiceAccessPoint REF SourceAccessPoint,
[in, out] CIM_LogicalElement REF TargetElements[],
[in] CIM_ServiceAccessPoint REF TargetAccessPoint,
[in] string ReplicationSettingData,
[out] CIM_ConcreteJob REF Job,
[out] CIM_Synchronized REF Synchronizations[],
[in] CIM_SettingData REF TargetSettingGoal,
[in] CIM_ResourcePool REF TargetPool,
[in] uint16 WaitForCopyState
);
Parameters
-
ElementNames [in]
-
An array of end user relevant names for the elements being created. If NULL, then a system supplied name is used. The value will be stored in the 'ElementName' property for the created element. The first element of the array ElementNames is assigned to the first replica, the second element to the second replica and so on. If there are more SourceElements entries than ElementNames, the system supplied name is used.
-
SyncType [in]
-
SyncType describes the type of copy that will be made. The same SyncType applies to all elements in the list.
-
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, the implementation decides the mode. The same Mode applies to all elements in the list.
Synchronous (2)
Asynchronous (3)
DMTF Reserved
Vendor Specific
SourceElements [in]
A list of source storage objects which may be StorageVolumes or other storage objects. All the source elements shall be of the same type -- for example, all StorageVolumes.
SourceAccessPoint [in]
Reference to source access point information. If NULL, service does not need access information to access the source element. This parameter applies to all elements in the source list.
TargetElements [in, out]
Optionally, as an input, refers to the target elements to use. If specified, the elements will match one to one with SourceElements[]. As an output, refers to the created target storage elements (i.e., the replicas). If a job is created, the target elements may not be available immediately.
TargetAccessPoint [in]
Reference to target access point information. If NULL, service does not need access information to access the target elements. This parameter applies to all elements in the target list.
ReplicationSettingData [in]
If provided, it overrides the default replication setting data for the given SyncType. If not provided, the provider uses the default replication setting data. The same ReplicationSettingData applies to all SourceElements entries.
Job [out]
Reference to the job (may be NULL if job is completed).
Synchronizations [out]
Reference to the created associations between the source and the target elements. If a job is created, this parameter may be NULL unless the associations are actually formed.
TargetSettingGoal [in]
The definition for the SettingData to be maintained by the target storage objects (the replicas). If the target elements are supplied, this parameter shall be NULL. This parameter applies to all elements in the target list.
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 the target elements are supplied, this parameter shall be NULL. This parameter applies to all elements in the target list.
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 copy operation remains idle until it is activated. Synchronized: Replicas are an exact copy of the sources. UnSynchronized: Copy operation is in progress. If this parameter is supplied, then all the created replication relationships shall have this supplied CopyState before the method returns.
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