Enable-StorageGroupCopy

 

Applies to: Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3

Use the Enable-StorageGroupCopy cmdlet to enable local continuous replication (LCR) for a storage group and to enable standby continuous replication (SCR) for a storage group using Microsoft Exchange Server 2007 Service Pack 1 (SP1). When enabling SCR for a storage group, both the SCR source and the SCR target must have Exchange 2007 SP1 installed.

Syntax

enable-StorageGroupCopy -Identity <StorageGroupIdParameter> [-Confirm [<SwitchParameter>]] [-CopyLogFolderPath <NonRootLocalLongFullPath>] [-CopySystemFolderPath <NonRootLocalLongFullPath>] [-DomainController <Fqdn>] [-ReplayLagTime <Nullable>] [-SeedingPostponed <SwitchParameter>] [-StandbyMachine <String>] [-TruncationLagTime <Nullable>] [-WhatIf [<SwitchParameter>]]

Detailed Description

An Exchange administrator may want to enable LCR or SCR for an existing storage group on an Exchange 2007 server with the Mailbox server role installed. To successfully initiate an Enable-StorageGroupCopy operation, the following conditions must be met:

  • The location of the paths must be on a fixed drive.

  • The path cannot be shared by more than one storage group under the same server in the Active Directory directory service.

  • The paths must be unique. They may not correspond to an already defined storage group or another storage group copy.

  • When enabling SCR by using the StandbyMachine parameter, the specified SCR source can be located on a clustered mailbox server (either CCR or SCC).

  • When using the Enable-StorageGroupCopy cmdlet with LCR, the specified storage group must exist and the database in it must have its copy enabled for continuous replication with the Enable-DatabaseCopy cmdlet. The Enable-DatabaseCopy cmdlet does not need to be used when using the Enable-StorageGroupCopy cmdlet to enable SCR.

  • The StandbyMachine parameter cannot be combined with the CopyLogFolderPath or the CopySystemFolderPath parameters. This is because the SCR target storage group will automatically use the same paths as the SCR source storage group.

After an Enable-StorageGroupCopy cmdlet operation has completed, unless the SeedingPostponed parameter is specified, the passive copy of the database or SCR target database will be seeded as part of the task operation.

To run the Enable-StorageGroupCopy cmdlet, the account you use must be delegated the Exchange Server Administrator role and local Administrators group for the target server. For more information about permissions, delegating roles, and the rights that are required to administer Exchange 2007, see Permission Considerations.

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.StorageGroupIdParameter

The Identity parameter takes one of the following values:

  • GUID

  • Name of storage group

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm parameter causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You do not have to specify a value with the Confirm parameter.

CopyLogFolderPath

Optional

Microsoft.Exchange.Data.NonRootLocalLongFullPath

The CopyLogFolderPath parameter is used in an LCR environment to specify the path where the log files are stored. The default path is: <ExchangeInstallPath>\ LocalCopies\<SGName>. This parameter cannot be combined with the StandbyMachine parameter.

CopySystemFolderPath

Optional

Microsoft.Exchange.Data.NonRootLocalLongFullPath

The CopySystemFolderPath parameter is used in an LCR environment to specify the path where the storage group system files are stored. The default path is: <ExchangeInstallPath>\ LocalCopies\<SGName>. This parameter cannot be combined with the StandbyMachine parameter.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name (FQDN) of the domain controller to use, include the DomainController parameter in the command.

ReplayLagTime

Optional

System.Nullable

The ReplayLagTime parameter is used to specify the amount of time that the Microsoft Exchange Replication service should wait before replaying log files that have been copied to the SCR target computer. The format for this parameter is (Days.Hours:Minutes:Seconds). The default setting for this value is 24 hours. The maximum allowable setting for this value is 7 days. The minimum allowable setting is 0 seconds, although setting this value to 0 seconds effectively eliminates any delay in log replay activity beyond the default delay of 50 log files.

SeedingPostponed

Optional

System.Management.Automation.SwitchParameter

Use of the SeedingPostponed parameter results in the task not seeding the storage group copy. The administrator must then explicitly seed the storage group copy.

StandbyMachine

Optional

System.String

The StandbyMachine parameter specifies the name of a Mailbox server that will be configured as a target for SCR. This parameter must be used for creating an SCR target. This parameter cannot be combined with the CopyLogFolderPath or the CopySystemFolderPath parameters.

TruncationLagTime

Optional

System.Nullable

The TruncationLagTime parameter specifies the amount of time that the Microsoft Exchange Replication service should wait before truncating log files that have been copied to the SCR target computer and replayed into the copy of the database. The time period begins after the log has been successfully replayed into the copy of the database. The format for this parameter is (Days.Hours:Minutes:Seconds). The maximum allowable setting for this value is 7 days. The minimum allowable setting is 0 seconds, although setting this value to 0 seconds effectively eliminates any delay in log truncation activity.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf parameter instructs the command to simulate the actions that it would take on the object. By using the WhatIf parameter, you can view what changes would occur without having to apply any of those changes. You do not have to specify a value with the WhatIf parameter.

Errors

Error Description

The LogFolderPath and CopyLogFolderPath that you specified must not be the same. Specified folder path: %logfolderpath%

Another storage group on the same server uses the same copy log file location as this storage group. You must specify a unique path for the copy log file location.

The SystemFolderPath and CopySystemFolderPath that you specified must not be the same. Specified folder path: %logfolderpath%

Another storage group on the same server uses the same copy system file location as this storage group. You must specify a unique path for the copy system file location.

The storage group you specified is a recovery storage group. Specified storage group: %SGIdentity%

The specified storage group is a recovery storage group. LCR does not support recovery storage groups.

A storage group copy is already defined for '<SGName>'.

The storage group already has LCR enabled.

The database under this storage group is not local continuous replication enabled. Please enable local continuous replication on the database before enabling local continuous replication on this storage group.

One or more databases under this storage group are not LCR enabled. You must enable LCR on all databases before you can enable LCR on this storage group.

This task is not supported on a cluster.

The Enable-StorageGroupCopy cmdlet cannot be used to enable LCR on a clustered mailbox server because LCR is only supported on stand-alone Mailbox servers.

The location for log files is not a fixed drive.

The location of the copy log file is not on a fixed drive. You must specify a fixed drive location to run the Enable-StorageGroupCopy cmdlet.

The location for system files is not a fixed drive.

The copy system file location is not on a fixed drive. You must specify a fixed drive location to run the Enable-StorageGroupCopy cmdlet.

The location specified for log file copies (<LogPath>) is illegal/invalid. Please verify that the directory exists and is empty.

The location specified for the transaction log file copies is illegal or invalid. You must verify that the directory exists and that there are no files in it before running the Enable-StorageGroupCopy cmdlet.

The location of the copy's system files (<SystemPath>) is not available in the file system.

The location of the copy system file is not available in the file system. You must verify that the location specified exists and is accessible before running the Enable-StorageGroupCopy cmdlet.

The log path (<logPath>) for the copy already contains files with a matching prefix. To avoid overwriting the existing files, use Move-StorageGroupPath -ConfigurationOnly to change the configuration without moving any files.

The log path that you specified for the LCR copy already contains files with a matching prefix. You can avoid overwriting the existing files by using the Move-StorageGroup command –ConfigurationOnly optional parameter to change the configuration without moving any files.

The system path (<SystemPath>) for the copy already contains files with a matching prefix. To avoid overwriting the existing files, use Move-StorageGroupPath -ConfigurationOnly to change the configuration without moving any files.

The system path that you specified for the LCR copy already contains files with a matching prefix. You can avoid overwriting the existing files by using the Move-StorageGroup command –ConfigurationOnly optional parameter to change the configuration without moving any files.

Automatic initial seed failed for <SGName> with error code <ErrorCode>. Use Update-StorageGroupCopy task to retry.

The Enable-StorageGroupCopy cmdlet did not complete automatic initial seeding successfully for the specified storage group. You must reseed by using the Update-StorageGroupCopy cmdlet.

Automatic initial seed was not attempted for <SGName>.

The Enable-StorageGroupCopy cmdlet did not perform automatic initial seeding for the specified storage group. You will need to perform an initial seed by using the Update-StorageGroupCopy cmdlet.

The Windows Cluster service encountered an error during function IsNodeClustered.

The computer specified by the StandbyMachine parameter could not be contacted or does not exist.

Example

The following code is an example of the Enable-StorageGroupCopy command to enable LCR for a storage group named SG1 while specifying the path locations for the CopyLogFolderPath and CopySystemFolderPath parameters.

The second example shows how to enable an SCR target on a computer named Server2 for a storage group named SG1.

The third example shows how to enable an SCR target on a computer named Server3 for a storage group named SG2, with an administrator-set replay delay time of 10 minutes.

Enable-StorageGroupCopy -Identity SG1 -CopyLogFolderPath "D:\Logs1\SG1" -CopySystemFolderPath "D:\Logs1\SG1"
Enable-StorageGroupCopy -Identity SG1 -StandbyMachine Server2
Enable-StorageGroupCopy -Identity SG2 -StandbyMachine Server3 -ReplayLagTime 0.0:10:0