In visiting my customers I noticed that there is generally a lack of understanding of Standby Continuous Replication (SCR). After looking around the Internet I found that there is a lack of information available on this subject. What I wanted to do is put together an article that helps setup a lab to walk through the options for SCR.
Lab Setup:
HC1 – Hub & CAS roles installed
Node1 – First node of the cluster
Node2 – Second node of the cluster
CCRCluster – Name of the cluster
MB1 – Exchange server name (CMS)
SCR – Standby Server
DC1 – Domain Controller
G: – Database Location
E: – Transaction Log file location
Accounts – Bill Smith, Joe Flacco
Option 1: Exchange 2007 Database Portability
1. Disable Windows firewall on Node1, Node2, and SCR1
Start -> Settings -> Control Panel.
Double click the “Windows Firewall” icon.
Click on “Change Settings” to turn off the firewall.
2. Remove all Storage Groups and databases on SCR1. Also delete the log files and databases files
3. Logon to Node1 and type:
Enable-StorageGroupCopy “mb1First Storage Group” -StandbyMachine SCR1 -replaylagtime 0.0:0:0
This will start the SCR replication between MB1 and SCR1. We will set the replaylagtime to 0 so replication will start right away
4. On SCR1 in EMS type:
Get-StorageGroupCopyStatus “mb1First Storage Group” -StandbyMachine SCR1
Make sure that replication has started and log files are getting replicated to SCR1
5. After you have confirmed that replication has started and log files are being created on SCR1, on SCR1 in EMS type:
suspend-storagegroupcopy “mb1First Storage Group” -standbymachine SCR1
We will suspend the replication to seed the database
6. On SCR1 navigate to the E:SG1 and G:SG1 and delete all the files (In this lab this is the location of the database and log files)
7. On SCR1 in EMS type:
update-storagegroupcopy -id “mb1First Storage Group” -standbymachine SCR1
This command seeds the database file on the SCR1. Check G:SG1 and ensure the database has been created
8. On SCR1 in EMS type:
resume-storagegroupcopy -id “mb1First Storage Group” -standbymachine SCR1
Replication between the MB1 and SCR1 will now start again
9. On SCR1 in EMS type:
Get-StorageGroupCopyStatus “mb1First Storage Group” -StandbyMachine SCR1
Make sure that all the log files have been replicated and SCR is in a healthy state
10. Open OWA for Bill Smith’s account. Take note of the amount of items in the inbox (at the bottom of the OWA page it will say Items x of x). Log off all OWA and Outlook connections
11. On SCR1 create a new folder called SG1 Backup on the E:
12. On SCR1 create a new SG called “SG1 Backup” and point the files to E:SG1 Backup
13. On SCR1 create a new folder called DB1 on the G:
14. On SCR1 create a new database called DB1 and point the files to G:DB1
15. Mount the database SG1 BackupDB1
16. Dismount the database SG1 BackupDB1
17. On SCR1 delete the files in the E:SG1 Backup and G:DB1 folders
18. On Node1 dismount database “First Storage GroupMailbox Database”
19. On SCR1 in EMS type:
Restore-StorageGroupCopy “mb1First Storage Group” -StandbyMachine SCR1 –force
This will move the owner of MB1 to SCR1 and break the SCR replication
20. Now we want to check the health of the database and replay any logs that haven’t been played into the database during the SCR process
21. On SCR1 in EMS type:
eseutil /mh “G:SG1Mailbox Database.edb”
Is the database in a clean state?
22. On SCR1 in EMS type:
E:
cd SG1
23. On SCR1 in EMS type:
eseutil /r e00
This will replay the log files against the database
24. On SCR1 in EMS type:
eseutil /mh “G:SG1Mailbox Database.edb”
Is the database in a clean state?
25. On SCR1 in EMS type:
move-storagegrouppath “scr1SG1 Backup” -systemfolderpath “E:SG1” -logfolderpath “E:SG1” -configurationonly
When we run this command we are changing the location where SG1 Backup will look for Exchange files. No data is moved only the path
26. On SCR1 in EMS type:
move-databasepath “scr1SG1 Backupdb1” -edbfilepath “G:SG1mailbox database.edb” -configurationonly
When we run this command we are changing the location where db1 will look for Exchange files. No data is moved only the path
27. Open the properties of database DB1 and mark This database can be overwritten by a restore
28. Mount the database SG1 Backupdb1
29. On SCR1 in EMS type:
Get-Mailbox -Database “mb1First Storage Groupmailbox database” | where {$_.objectclass -notmatch ‘(systemattendantmailbox|ExOleDbSystemMailbox)’}| Move-Mailbox -configurationonly -TargetDatabase “scr1SG1 BackupDB1”
Type A to process all mailboxes
We are changing attributes for the users that resided on MB1First storage groupMailbox database to point to SCR1 as their mailbox server
30. Logon to Outlook and OWA, Check to ensure Bill Smith’s mail content is present. Open Outlook ensure that the outlook profile has been automatically redirected to the correct mailbox server (to check the mailbox server, right click on the Outlook icon in the toolbar while holding down the CTRL key and select connection status ).
31. Send a new message between Bill Smith to Joe Flacco
Subject: Outage
Body: Did you here we had an Exchange server outage?
Make sure Joe Flacco gets the email message
32. Log off all OWA and Outlook connections
33. On SCR1 dismount database SG1 BackupDB1
34. On SCR1 in EMS type:
Get-Mailbox -Database “scr1SG1 BackupDB1” | where {$_.objectclass -notmatch ‘(systemattendantmailbox|ExOleDbSystemMailbox)’}| Move-Mailbox -configurationonly -TargetDatabase “mb1First Storage Groupmailbox database”
Type A to process all mailboxes
Pointing the mailboxes back to MB1 as the home mailbox server
35. On Node1 and Node2 navigate to E:SG1 and Remove all the folders, E00 Log file, E00temp log file, checkpoint file and res log files. Make sure you leave the rest of the log files
36. Now check the last log copied over from Node1 and Node2. Write that log number down
37. On SCR1 find the log number that you wrote down from Node1 and Node2. Now only copy over the newer log files from SCR1 to Node1 and Node2
38. Rename the newest log file on Node1 to E00
39. On SCR1 in EMS type:
E:
cd SG1
ESEUTIL /R E00 /A
40. Mount database First Storage GroupMailbox Database on Node1
41. Fix any CCR replication issues
42. Is the message from Bill Smith is in Joe Flacco’s mailbox.
43. Remove the mailbox Role and Management Tools from SCR1
Option 2: Exchange 2007 CMS name change
1. Delete folder C:Program FilesMicrosoft and delete all the folders under E: and G:
2. Navigate to C:WindowsSystem32driversetc and open file Host at the end of the file enter
127.0.0.1 crl.microsoft.com
3. Open Failover Cluster Management and Create a new cluster
4. Next > Type SCR1 > Add > Next > Next > Next > Next > Next > Finish > Cluster Name field type CCRCLUSTERDR > enter IP address of 192.168.1.45 > Next > Next > Finish
5. Navigate to C:E2k7 and run Setup
6. Continue through the setup wizard until you get to the Installation Type window. Select Custom Exchange Server Installation > Passive Clustered Mailbox Role > Finish the Exchange installation
7. On SCR1 in EMS type:
Enable-StorageGroupCopy “mb1First Storage Group” -StandbyMachine SCR1 -replaylagtime 0.0:0:0
8. On SCR1 in EMS type:
Get-StorageGroupCopyStatus “mb1First Storage Group” -StandbyMachine SCR1
9. On SCR1 in EMS type:
Suspend-StorageGroupCopy “mb1First Storage Group” –StandbyMachine SCR1
10. On SCR1 navigate to the E:SG1, and G:SG1 delete all the files
11. On SCR1 in EMS type:
Update-StorageGroupCopy “mb1First Storage Group” –StandbyMachine SCR1
Check to make sure the database is present under G:SG1
12. On SCR1 in EMS type:
resume-StorageGroupCopy “mb1First Storage Group” –StandbyMachine SCR1
13. On SCR1 in EMS type:
Get-StorageGroupCopyStatus “mb1First Storage Group” -StandbyMachine SCR1
Make sure that all logs files are replicated
14. On Node1 in EMS type:
Cluster.exe res “Network Name (mb1)” /priv HostRecordTTL=300
The DNS Time to Live (TTL) value for the clustered mailbox server’s Network Name resource is configured for five minutes. This was configured by running this command, and then stopping and starting the clustered mailbox server.
15. On Node1 in Failover Cluster Management click on MB1 and take resource offline
16. On Node1 in Failover Cluster Management click on MB1 and take resource online
17. On Node1 dismount database First Storage GroupMailbox Database
18. On SCR1 in EMS type:
Restore-StorageGroupCopy “mb1First Storage Group” -StandbyMachine SCR1
In the preceding command, the Force parameter is not used because the SCR source server is available. Because the Force parameter is not used, the task will automatically attempt to copy all of the log files from the SCR source.
19. On SCR1 in EMS type:
Disable-StorageGroupCopy -Identity “mb1First Storage Group” -StandbyMachine SCR1 -Confirm:$False
20. On Node1 in Failover Cluster Management click on MB1 and take resource offline
21. Delete DNS record for MB1 (192.168.1.36)
22. On SCR1 in EMS type:
23. Ipconfig /flushdns
24. On SCR1 in EMS type:
25. Setup.com /RecoverCMS /CMSName:mb1 /CMSIPAddress:192.168.1.41
26. On SCR1 Mount First Storage GroupMailbox Database
44. Logon to Outlook and OWA, Check to ensure Bill Smith’s mail content is present. Open Outlook ensure that the outlook profile has been automatically redirected to the correct mailbox server (to check the mailbox server, right click on the Outlook icon in the toolbar while holding down the CTRL key and select connection status ).
45. Send a new message between Bill Smith to Joe Flacco
Subject: DR Site
Body: Did you hear our mailbox has been moved to the DR site?
27. Make sure Joe Flacco gets the email message
Failback
28. On SCR1 in Failover Cluster Management click on MB1 and take resource offline
29. On Node1 in EMS type:
Setup.com /ClearLocalCMS /CMSName:mb1
During the controlled switch, the clustered mailbox server running on SCR1 is stopped so that it could be brought up on Node1. After MB1 is successfully put back into production on Node1, its configuration information needs to be removed from SCR1. The configuration information can be cleared, and MB1 can be completely removed from SCR1 by removing any non-Exchange resources from the cluster group containing the clustered mailbox server, and then running the following command:
30. Open Failover Cluster Management on Node1 and make sure MB1 is removed.
31. Open Active Directory user and Computer and check to make sure the MB1 computer object is enabled. If not, enable MB1
32. On Node1 and Node2 delete all the files on E:SG1 and G:SG1
33. On Node1 in EMS type:
Enable-StorageGroupCopy “mb1First Storage Group” -StandbyMachine Node1 -replaylagtime 0.0:0:0
34. On Node1 in EMS type:
Suspend-StorageGroupCopy “mb1First Storage Group” –StandbyMachine Node1
35. On Node1 Delete all files under E:SG1 and G:SG1
36. Copy the database file from SCR1G:SG1 to Node1G:SG1
37. On Node1 in EMS type:
update-StorageGroupCopy “mb1First Storage Group” –StandbyMachine Node1
Check G:SG1 that the database has been copied
38. On Node1 in EMS type:
resume-StorageGroupCopy “mb1First Storage Group” –StandbyMachine Node1
39. On Node1 in EMS type:
get-StorageGroupCopystatus “mb1First Storage Group” –StandbyMachine Node1
Make sure all the logs have been replicated
40. On SCR1 dismount database First Storage GroupMailbox Database
41. On Node1 in EMS type:
Restore-StorageGroupCopy “mb1First Storage Group” -StandbyMachine Node1 -force
42. Delete DNS record for MB1 (192.168.1.41)
43. On Node1 in EMS type:
Ipconfig /flushdns
44. Setup.com /RecoverCMS /CMSName:mb1 /CMSIPAddress:192.168.1.36
45. On Node1 mount all databases
46. fix replication for ccr
47. On Node1 type:
Cluster.exe res “Network Name (mb1)” /priv HostRecordTTL=300
Done we should now be back on the CCR cluster. You can run through the steps again to setup SCR between the CCR cluster and SCR if you want. You can now see that SCR was a major after thought of Microsoft’s since they didn’t add SCR until SP1 and removed the idea all together in Exchange 2010.