Editar

Compartilhar via


New-SRGroup

Creates a replication group.

Syntax

New-SRGroup
   [[-ComputerName] <String>]
   [-Name] <String>
   [-VolumeName] <String[]>
   [-LogVolumeName] <String>
   [[-LogSizeInBytes] <UInt64>]
   [[-Description] <String>]
   [-EnableConsistencyGroups]
   [-EnableEncryption]
   [-EnableCompression]
   [-Force]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [<CommonParameters>]

Description

The New-SRGroup cmdlet creates a replication group. A replication group contains one or more data volumes and an associated log volume. A replication group is the container for replication.

Examples

Example 1: Create a replication group

New-SRGroup -ComputerName "SR-SRV05" -Name "ReplicationGroup01" -VolumeName "D:" -LogVolumeName "E:"

This command creates a replication group for server named SR-SRV05. The command specifies the replicated volume and the log volume. Because this command does not specify other parameters, the replication group uses default values. Replication will not start until you run the New-SRPartnership cmdlet.

Example 2: Create a replication group that uses custom properties

$Parameters = @{
    ComputerName = 'SR-SRV05'
    Name = 'ReplicationGroup02'
    VolumeName = 'D:'
    LogVolumeName = 'E:'
    LogSizeInBytes = '32GB'
    EnableEncryption = $True
}
New-SRGroup @Parameters

This command creates a replication group for server named SR-SRV05. The command specifies the replicated volume and the log volume. The command also specifies a custom log size in GB and enables replication traffic encryption. Replication will not start until you run New-SRPartnership.

This example uses splatting to pass parameter values from the $Parameters variable to the command. Learn more about Splatting.

Parameters

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

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

-CimSession

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Type:CimSession[]
Aliases:Session
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ComputerName

Specifies a single replica host computer NetBIOS name or fully qualified domain name (FQDN) of a computer to belong to the replication group. The default value is the local computer.

Type:String
Aliases:CN
Position:0
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Description

Specifies a description for the replication group.

Type:String
Aliases:D
Position:5
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EnableCompression

Indicates that this Storage Replica group should use SMB compression for data transfer. SMB compression is only used with TCP, and isn't supported on both SMB Direct and RDMA networks.

Type:SwitchParameter
Aliases:ECMP
Position:9
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EnableConsistencyGroups

Indicates that consistency groups are enabled for the replication group that contains multiple volumes. Consistency groups provide write ordering. This can be important, for example, for replication of application data on multiple volumes.

If you enable consistency groups, it may decrease replication and write Input/Output performance.

Type:SwitchParameter
Aliases:EC
Position:6
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EnableEncryption

Indicates that this partnership should encrypt connection by using SMB AES-128-GCM. Enabling encryption can protect Storage Replica block transfers from man-in-the-middle interception or reading. Enabling encryption decreases performance.

Type:SwitchParameter
Aliases:EE
Position:7
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Aliases:F
Position:100
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LogSizeInBytes

Specifies the aggregate size of log files on each server in the replication group for the volumes that are associated with this replication group. The minimum size 512MB. You can specify a value by using the Windows PowerShell byte conversion capability, such as 4GB or 3200MB.

A value that is too small may cause decreased replication performance or increased recovery time after an interruption between computers.

Type:UInt64
Aliases:LS
Position:4
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-LogVolumeName

Specifies a drive letter, mount point path, or volume GUID where Storage Replication creates destination replication logs. The value must contain an NTFS-formatted volume or ReFS-formatted volume. The path must exist. The path cannot be a mapped drive or UNC path.

Storage Replication creates logs in the System Volume Information folder.

Type:String
Aliases:LV
Position:3
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specifies a name for the replication group.

Type:String
Aliases:N
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ThrottleLimit

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

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

-VolumeName

Specifies an array of drive letters or mount point paths for the replica. The volumes must exist. The volumes cannot be mapped drives or UNC paths.

This is an ordered list. The order of volumes determines the order of replication. For more information, see the DestinationVolumeName parameter of the New-SRPartnership cmdlet.

We do not recommend replicating different drive letters or mount point paths. The practice can cause application failures because of stored settings after a failover occurs.

Type:String[]
Aliases:VN
Position:2
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Outputs

CimInstance