CreateReplica method of the MSFT_SMStorageVolume class
Creates a replication relationship between virtual disks.
Syntax
UInt32 CreateReplica(
[in] string ElementName,
[in] uint16 SyncType,
[in] uint16 Mode,
[in] MSFT_SMReplicaPeer REF TargetStorageSystem,
[in, out] MSFT_SMStorageVolume REF TargetStorageVolume,
[in] MSFT_SMPool REF TargetStoragePool,
[in] UInt32 RecoveryPointObjective,
[in, optional] MSFT_SMReplicationSettings ReplicationSettings,
[out] MSFT_SMReplicaPeer REF TargetReplicaPeer,
[in, optional] String username,
[in, optional] String password,
[out] MSFT_SMJob REF Job,
[out, optional] MSFT_SMExtendedStatus ExtendedStatus
);
Parameters
-
ElementName [in]
-
The user friendly name for the replica relationship. The systems can use a default name if this value is set to NULL.
-
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 65535
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]
A MSFT_SMReplicaPeer object that specifies the replica target system to use when the replication relationship is created.
TargetStorageVolume [in, out]
A MSFT_SMStorageVolume object that specifies the volume to create for the replica relationship. If this parameter is specified, the TargetStoragePool parameter will be ignored.
TargetStoragePool [in]
The MSFT_SMPool object that specifies the storage pool to create for the replica relationship. This volume is ignored if the TargetStorageVolume parameter is specified.
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.
ReplicationSettings [in, optional]
The replication settings.
TargetReplicaPeer [out]
When this method returns, this parameter contains a reference to the MSFT_SMReplicaPeer object that specifies the replica peer for the target volume of the replica relationship.
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 |
Header |
|
MOF |
|
DLL |
|