Start-ServiceFabricPartitionDataLoss
Initiates a data loss fault operation on a partition of a stateful Service Fabric service.
Syntax
PartitionId
Start-ServiceFabricPartitionDataLoss
-OperationId <Guid>
-DataLossMode <DataLossMode>
-PartitionId <Guid>
-ServiceName <Uri>
[-TimeoutSec <Int32>]
[<CommonParameters>]
ServiceNameRandomPartition
Start-ServiceFabricPartitionDataLoss
-OperationId <Guid>
-DataLossMode <DataLossMode>
-ServiceName <Uri>
[-TimeoutSec <Int32>]
[<CommonParameters>]
ServiceNamePartitionSingleton
Start-ServiceFabricPartitionDataLoss
-OperationId <Guid>
-DataLossMode <DataLossMode>
-ServiceName <Uri>
[-PartitionKindSingleton]
[-TimeoutSec <Int32>]
[<CommonParameters>]
ServiceNamePartitionNamed
Start-ServiceFabricPartitionDataLoss
-OperationId <Guid>
-DataLossMode <DataLossMode>
-ServiceName <Uri>
-PartitionKey <String>
[-PartitionKindNamed]
[-TimeoutSec <Int32>]
[<CommonParameters>]
ServiceNamePartitionUniformedInt
Start-ServiceFabricPartitionDataLoss
-OperationId <Guid>
-DataLossMode <DataLossMode>
-ServiceName <Uri>
-PartitionKey <String>
[-PartitionKindUniformInt64]
[-TimeoutSec <Int32>]
[<CommonParameters>]
Description
The Start-ServiceFabricPartitionDataLoss cmdlet initiates a data loss on a stateful service partition in Azure Service Fabric. To run this cmdlet, FaultAnalysisService must be enabled.
Run this cmdlet to perform a data loss fault only for partitions for stateful services. Do not use this cmdlet to perform a data loss for system services.
Different ways to specify the partition on which to invoke data loss are shown in the Syntax section.
You can check the progress of the data loss fault operation using the Get-ServiceFabricPartitionDataLossProgress cmdlet.
After you invoke Start-ServiceFabricPartitionDataLoss, you cannot reverse it.
For details about how to invoke a data loss operation, see Introduction to the Fault Analysis Service.
Examples
Example 1: Start a data loss test for a service by partition ID
PS C:\> Start-ServiceFabricPartitionDataLoss -OperationId d3f12b09-6a90-4745-a4fc-3f92149a7419 -DataLossMode FullDataLoss -PartitionId 67e2c139-ccf0-4562-9f2b-bf35e4c2abd4 -ServiceName "fabric:/ContosoApp/ContosoService"
This command starts a data loss fault operation for all replicas of the service named fabric:/ContosoApp/ContosoService in the partition that has the ID 67e2c139-ccf0-4562-9f2b-bf35e4c2abd4. Specify a unique GUID for the OperationId parameter. You can use this ID to check the progress of the data loss fault operation.
Parameters
-DataLossMode
Specifies the data loss mode for the data loss fault operation. The acceptable values for this parameter are:
- PartialDataLoss. Only a quorum of replicas are removed. OnDataLossAsync is triggered for the partition, but actual data loss depends on the presence of inflight replication.
- FullDataLoss. All replicas are removed. All data is lost and OnDataLossAsync is triggered.
To find more about OnDataLossAsync please refer to the Back up and restore article.
Parameter properties
Type: | DataLossMode |
Default value: | None |
Accepted values: | Invalid, PartialDataLoss, FullDataLoss |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-OperationId
Specifies a unique identifier for this operation. Specify a unique value. If you want to check the progress of the fault, you must pass the OperationId that you used for starting the data loss fault into Get-ServiceFabricPartitionDataLossProgress.
Parameter properties
Type: | Guid |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-PartitionId
Specifies the ID of the Service Fabric partition for which this cmdlet starts a data loss fault.
Parameter properties
Type: | Guid |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
PartitionId
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-PartitionKey
Specifies the key of the Service Fabric partition for which this cmdlet starts a data loss fault.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ServiceNamePartitionNamed
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
ServiceNamePartitionUniformedInt
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-PartitionKindNamed
Indicates that the Service Fabric partition for which this cmdlet starts a data loss fault is a Named partition.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ServiceNamePartitionNamed
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-PartitionKindSingleton
Indicates that the Service Fabric partition for which this cmdlet starts a data loss fault is a singleton partition.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ServiceNamePartitionSingleton
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-PartitionKindUniformInt64
Indicates that the Service Fabric partition for which this cmdlet starts a data loss fault is a UniformInt64 partition.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ServiceNamePartitionUniformedInt
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ServiceName
Specifies the Uniform Resource Identifier (URI) of a Service Fabric service.
Parameter properties
Type: | Uri |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-TimeoutSec
Specifies the time-out period, in seconds, for the fault.
Parameter properties
Type: | Int32 |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.