Repair-ServiceFabricPartition

Brings a partition out of quorum loss.

Syntax

Repair-ServiceFabricPartition
      [-Force]
      [-PartitionId] <Guid>
      [-TimeoutSec <Int32>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Repair-ServiceFabricPartition
      [-Service]
      [-Force]
      -ServiceName <Uri>
      [-TimeoutSec <Int32>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Repair-ServiceFabricPartition
      [-All]
      [-Force]
      [-TimeoutSec <Int32>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Repair-ServiceFabricPartition
      [-System]
      [-Force]
      [-TimeoutSec <Int32>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Repair-ServiceFabricPartition cmdlet brings a stateful persisted partition forcefully out of quorum loss. If a majority of the replicas of a stateful persisted partition goes down, the partition goes into a state of quorum loss. While in this state, write operations are not allowed for that partition and the partition cannot be reconfigured. The expectation at this point is for the replicas to come back up so that the partition can resume making progress. However, if replicas cannot come back up, you can run this cmdlet to bring the partition out of quorum loss. If the primary replica is also down, data loss is declared for the partition.

Before you perform any operation on a Service Fabric cluster, establish a connection to the cluster by using the Connect-ServiceFabricCluster cmdlet.

Examples

Example 1: Repair all partitions

PS C:\> Repair-ServiceFabricPartition -All

This command repairs all the partitions that are in the quorum loss state.

Example 2: Repair a partition

PS C:\> Repair-ServiceFabricPartition -PartitionId 861907d2-1c38-4cf8-8bb4-49f4fec4a2e5

This command repairs the partition with the specified partition ID.

Example 3: Repair all the partitions of a service

PS C:\> Repair-ServiceFabricPartition -Service -ServiceName fabric:/MyApp/MyPersistedService

This command repairs all the partitions of the service fabric:/MyApp/MyPersistedService.

Example 4: Repair the partitions of the system services

PS C:\> Repair-ServiceFabricPartition -System

This command repairs all the partitions of all the system services.

Parameters

-All

Indicates that this cmdlet repairs all the partitions that are in quorum loss.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PartitionId

Specifies the ID of a Service Fabric partition. This cmdlet repairs only the partition that this parameter specifies.

Type:Guid
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Service

Indicates that this cmdlet repairs only the partitions of the service that the ServiceName parameter specifies.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ServiceName

Specifies the Uniform Resource Identifier (URI) of a Service Fabric service.

Type:Uri
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-System

Indicates that this cmdlet repairs all the partitions of the system services.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-TimeoutSec

Specifies the time-out period, in seconds, for the operation.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.Uri

System.Guid

Outputs

System.Object