Exchange 2007 – High Availability Solution – Standby Continuous Replication

                        Exchange 2007 – High Availability Solution – Standby Continuous Replication

Standby Continuous Replication is a new feature which is added as one of the high availability method in Exchange 2007 Server. This feature is supported in Exchange 2007 service pack1 only. By the name itself you can understand that standby continuous replication is a standby server which can bought up as soon as possible online so that user can start to access their mailboxes. You implement it as a recovery server in the same datacenter or else you can have a  on another datacenter.

It follows the same log shipping technology as like we have for LCR & CCR. The starting point of log shipping process is called as Source Server and the place where it is log shipped is called Target Server. SCR is supported for single mailbox server,LCR CCR & SCC.
Inorder to enable SCR on the alternate server you need to keep the alternate server in the same Active Directory Domain.

Difference between SCR as compare to LCR and CCR:
 In LCR and CCR we use to have LCR or CCR enable per storage group from source to target storage group on 1:1 ratio i.e one to one copy. However in SCR we can have a copy of storage group from source to many target server on 1:many ratio. But Microsoft always recommend to have maximum of 1:4 ratio.
 LCR and CCR can be enabled from powershell or GUI but SCR is enabled from Powershell command only.
 SCR will have delay in the log shipping technology because if we have logical corruption in the database still administrator can start the standby mailbox server for mail access.
 You cannot take the backup of target copy database.

SCR Deployment:
 SCR can be deployed from one storage group to another storage of another mailbox server which is located in different site (Single Mailbox Server concept between the site)
 

 SCR can be deployed in a CCR enabled server i.e having CCR enabled in one site and SCR enable from the CCR server in the different site.
 

 We can have one source storage group copy to many target storage group copy.

Command:
Already we are aware about all the basic commands for continuous replication which we have done in LCR and CCR, in SCR they have comeup with a new command “Enable-StorageGroupCopy” for enabling the SCR.

Test-ReplicationHealth
Get-StorageGroupCopyStatus -Identity <Server>\<StorageGroup> -StandbyMachine

Fine these are the basic overview..

I would like to show you the standby continuous replication for standalone server

My Lab Setup:
Site1:
                        MainDC – AD\DC\GC\DNS
                        Hub-Cas – holding the role of hub, cas and mailbox server

                        Edge Server – having 2 nic cards for connecting the site1 and site2

Site2:
                        Site-B – AD\DC\GC\DNS
                        DRE2K7 – Having three roles installed i.e hub,cas and mailbox server.

Thumbrule : All the servers for whom we need to configure standby continuous replication i.e Source and Target Server should be in the same domain.

I will show you how to enable SCR for one storage group and mounting the DR database.

Figure 4:
 

In the above figure I have created a storage group called as “SSG” and mailbox store called as “MBX-SSG”.
I have created one test account called as SSG-MBX. And also I have sent few test mail.
Figure 5:
 

Now lets check the size of the MBX-SSG.edb
Figure 6:
 

Configuration of SCR:

Now I need to configure SCR (standby continuous replication for SSG, so that if my SSG group get corrupted or my site-1 get effected I should have another site ready with me for mounting the database of SSG.

Inorder to do this:
Log on to DRE2K7 Server (This is my recovery\standalone server in other word it is my target server)

To enable SCR we need to type the following command from the power shell:
Enable-Storagegroupcopy sourceserver\Storage group -StandbyMachine TargetServer -ReplayLagTime 0:0:0

-ReplayLagTime  : This 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).

Note : I have set replay lag time to zero because it is lab test to education. However in realtime the default period for replaylagtime is 24 hours which can extended to 7 days or reduce to 0 seconds. Default delay in log replay activity of 50 log files. You can change the replay lag time however for default delay activity for 50 log files are hard coded you can’t change it. After being set, the value for this parameter cannot be changed without disabling and then enabling SCR.

One more thing I would like to add here is, as I have 2 different site or let say whenever you are configuring SCR between the site make sure that you are Replicaiton is working fine between the site and do a forceful replication whenever you make changes otherwise you will not get the output as you expected.

In my case I will type:
Enable-Storagegroupcopy hub-cas\ssg -StandbyMachine DRe2k7 -ReplayLagTime 0:0:0
Figure7:
 

Now I have enabled SCR for SSG
Next step I would do is force a replication between the sites, for forcing the replication between the sites I used Replmon tool.

Now you can see one folder created under C root drive of DRE2K7 after Enable-Storagegroupcopy
Figure 7.1:
 

However inside the SSG folder you won’t see any log file nor database because we need to manually seed the database and resume it back for log shipping process.

How to do seeding:
Now inorder to seed the database we need to suspend the continuous replication, then seeding the database and resume it back.

For suspending the continuous replication we need to type the following command:

Suspend-StorageGroupCopy sourceserver\Storagegroup -StandbyMachine Target Sever

i.e,
Suspend-StorageGroupCopy hub-cas\SSG -StandbyMachine DRE2K7
Figure 8:
 

Seeding the database : Update-StorageGroupCopy sourceserver\Storagegroup -StandbyMachine Target Sever
i.e.,
Update-StorageGroupCopy hub-cas\SSG -StandbyMachine DRE2K7
Figure 9:
 
Note : After running update command it has seeded the database on a target server.

Here I will run Replmon Tool for AD replication.

Even you can check the status of the storage group copy by running this following command
Get-storagegroupcopystatus sourceserver\SSG –StandbyMachine TargetMachine

Get-storagegroupcopy status hub-cas\ssg –standbymachine DRe2K7

Now after this I need to resume my suspend continuous replication and inorder to do that I need to run following command:
Resume-StorageGroupCopy sourceserver\Storagegroup -StandbyMachine Target Sever
i.e.,
Resume-StorageGroupCopy hub-cas\SSG -StandbyMachine DRE2K7

After resuming the storage group, check the status of continuous replication by running this command
Get-StorageGroupCopyStatus hub-cas\SSG - StandbyMachine DRE2K7 |Fl Summary*,Copy*
Figure 10:
 

In the DR Server you can see the database and log files which are shipped
Figure 11:
 
We have enabled SCR now inorder to mount the SCR database we need to have one Storage created and a mailbox store.
Note: If you create a same mailbox store or storage group name as like we have in production environment it will get conflict so we need to create a different storage
I am creating a storage group called as DRSSG and Mailbox Store called DRMBX and place I am storing the database in C:\DRSSG

Either you can create it from powershell or GUI
From powershell:
New-StorageGroup -Server DRe2k7 -name DRSSG  -LogFolderPath c:\DRSSG -systemfolderpath c:\DRSSG

New-MailboxDatabase -StorageGroup DRe2k7\DRSSG  -Name DRMBX  -EdbFilePath c:\DRSSG\DRMBX.edb

Mount-Database DRMBX

Dismount-Database DRMBX

Del c:\DRSSG\*.*

Note: I told you earlier we don’t require to create same store as like we have in production server so we need to create a new storage then we will do something like dial tone process for redirecting the production database to the recovery server databaase. Even you will notice that I have deleted all the content from the DRSSG folder.

Figure 12:
 

Figure 12.1:
You can see the DRSSG folder is empty:

Now we have successfully configured the SCR between the sites.
Note : while doing configuration you might face some issue whenever you are configuring SCR. I will give you some tips regarding troubleshooting of configuration and some workaround later in this article.

My data is working fine and SCR enabled. Now lets assume my database under SSG which is located in the production environment (Hub-Cas – Server name) got corrupted or may be server goes down due to uncircumstances situation. Now I require to make the database available to my resource. Now let see how we enable it as soon as possible.

Redirecting the data to our reovery Server (DRE2K7)
 As data got corrupted in my production environment, the first thing I need to do is dismount the database. So lets dismount the database :
Dismount-Database SourceServer\Storagegroup\database -Confirm:$False
 Then restore the database this is nothing but making the data avail on the dr server.
Restore-Storagegroupcopy SourceServer\Storagegroup\database -StandbyMachine TargetServer
Restore-Storagegroupcopy hub-cas\SSG\MBX-SSG -StandbyMachine DRE2K7
 Now check the database status of the replicated database on DR Server
Note: It will be always dirty shutdown
eseutil /mh “path of the database” from the bin directory
eseutil /mh “C:\SSG\MBX-SSG.edb”

Figure 13:
 
 Run soft recovery command : eseutil /r e02
Figure 14:
 
 Now again run eseutil /mh command to know the status of the database : This time it should be "Clean Shutdown"
Figure 15:
 
 Now we need to move the storage group path & database path to the newly created storage group- for more clarification on new storage group name see the figure 12 & 12.1(Note : we are just moving the configuration file only)
Command : move-storagegrouppath dre2k7\DRSSG -SystemFolderpath c:\SSG -Logfolderpath c:\SSG -configurationonly -confirm:$False

Move-DatabasePath dre2k7\DRSSG\DRmbx -edbfilepath c:\ssg\mbx-ssg.edb -ConfigurationOnly -Confirm:$False
Figure 16:
 
Note : with the configuration mode only the path are updated not the databases are moved

 we need to allow file restore, so run the following command
Command : Set-MailboxDatabase dre2k7\DRSSG\DRMBX -AllowFileRestore:$true
 now we can mount the DRMBX database
Mount-Database DRMBX
 Once you mount the database, now you can able to understand what does mean by configuration mode movement which I described in Figure 16
Figure 17:
 

Note : the path of DRSSG database right now it is showing C:\SSG but if you notice figure 12 & 12.1 the path was C:\DRSSG.

Now we are done with 95% of task, but what about the users who are located under SSG in the production, will they redirected automatically to DR server. Answer is No.
Figure 18:
 
Note : SSG-MBX is my test user which is still reflecting to my dismounted database of my production server.

 inorder to redirect the mailbox to the DR server, we need to run the following command:
Get-Mailbox -Database hub-cas\SSG\MBX-SSG |where {$_.objectClass -NotMatch '(SystemAttendantMailbox |ExOleDBSystemMailbox)'}| Move-Mailbox -ConfigurationOnly -TargetDatabase DRE2K7\DRSSG\DRMBX -Confirm:$false
Figure 19:
 

 Now lets take a loot at the Mailbox – ssg-mbx (my test mailbox)
Figure 20:
 

Note: Now my mailbox is redirected to DR server.

 Let me check the mails in my test mailbox
Figure 21;
 

This how we can configure for site resilience.

Troubleshooting:
1) Whenever we configure SCR between the sites, major problem you will face is delay in the replication process for changes occurred. So use Replmon tool for replicating. I used it at each and every place eventhough I had good network connectivity.
2) Check the replication status after configuring the SCR like : run 
        a. Test-replicationhealth
        b. Get-storagegroupcopy status

Note: Your copy status should show healthy conditions or else your log file will not be replicated and can’t do restore storage group.
 you can try some the of the step when your storagecopy status is unhealthy:
        o suspend 
        o update
        o resume
        o get-storagegroupcopy
        o test-replication health.
 Whenever your replication status is healthy you will see the shared folder something like this Figure 22: in the production server
 

If you are not able to see that share icon.. you can do small trick here, which I did for my lab server.
 Run test-replicaitonhealth command on Dr server from the powershell window
    o This will give you one guid value : example The directory \\HUB-CAS\9b1c34e2-eda1-4688-8a08-a119a3ad4899$ required by the Microsoft Exchange Replication Service for HUB-CAS\SSG does not exist. Check the file system and its permissions.
    o In the application log you will see the following event:
        Event Type: Error
        Event Source: MSExchangeRepl
        Event Category: Service 
        Event ID: 2074
        Date:  2/21/2008
        Time:  4:41:42 AM
        User:  N/A
        Description:
        The directory \\HUB-CAS\9b1c34e2-eda1-4688-8a08-a119a3ad4899$ required by the Microsoft Exchange Replication Service for HUB-CAS\SSG does not exist. Check the file system and its permissions.
 First thing try to restart the Microsoft Replication Service. And replicate your AD.

If then also not working - small workaround which helped to resolve (small trick which worked for me)
 Then make a note of the guid value which you are able to see while running test-replicaitonhealth
 Right the storage group folder for which you want to enable SCR => Click on Share Tab, then paste that guid value in the share name and in the comment : \\servername\storagegroupname and then add Exchange Server group in Permission & security and give me full control or atleast special permission.
Note: Under Permission : Everyone will be added remove that group
Figure 23:
 

I hope that this article is being very informative for you all. Thanks a lot for spending your time in this matter.
Exchange 2007 high availability – Good improvement by Microsoft.

I would like to give special thanks to Microsoft team, msexchangeteam and msexchange.org website because without them I can’t reach to this level where I can share my view regarding this high availability.

Related Articles:
Exchange 2007 - Local Continuous Replication (High Availability)

Exchange 2007 – High Availability Solution – Cluster Continuous Replication

Exchange 2007 – High Availability Solution - Single Copy Cluster

Reference Article:

Standby Continuous Replication
Standby Continuous Replication: Site Resilience with Standby Clustering

 

What did you think of this article?




Trackbacks
  • Trackbacks are closed for this entry.
Comments

  • Thursday, February 28. 2008 Mueed Al-Enezi wrote:
    excellent post, I like your way, especially the snapshots.
    keep posting
    Reply to this
  • Sunday, March 09. 2008 Alaa A. Al-Ankar wrote:
    Good Article, detailed and informative one.

    Keep up the good work
    Reply to this
  • Tuesday, March 18. 2008 Muniraj wrote:
    Hi Ismail
    Please let me know any URL/Link
    where i can get list of Powershell command list to perform mailbox server
    activity's like create,move user
    create storage group , restrict quota etc, i'm planning to work cmd on lab environment
    Reply to this
  • Tuesday, March 18. 2008 Ismail Mohammed wrote:
    hi,

    you can open the powershell
    type the following command : get-excommand
    which should help you
    Reply to this
  • Saturday, May 31. 2008 Chad wrote:
    I have implemented an SCR solution at my company and have been doing some DR testing on our failover server. It seems that the:

    Get-Mailbox -Database hub-cas\SSG\MBX-SSG |where {$_.objectClass -NotMatch '(SystemAttendantMailbox |ExOleDBSystemMailbox)'}| Move-Mailbox -ConfigurationOnly -TargetDatabase DRE2K7\DRSSG\DRMBX -Confirm:$false

    command will only work if the primary server is still active (i.e. only the database was corrupted, not a hardware failure). I have found that if the primary server is completely offline, that command will not work.

    How can I restore user databases on the Standby server if the primary server is completely down? Do I need to use Recovery Storage Groups?
    Reply to this
  • Saturday, May 31. 2008 Ismail Mohammed wrote:
    hi chad,

    I was performing the Standby Continuous Replication: Database Portability method. For your case you need to perform Standby Continuous Replication: Site Resilience with Standby Clustering for more information on this SCR site resilience you can see this http://technet.microsoft.com/en-us/library/bb738150(EXCHG.80).aspx

    Thanks and Warm Regards
    Ismail Mohammed
    Reply to this
  • Saturday, July 19. 2008 Paul Webb wrote:
    Hi

    When I run the command eseutil /r E02 I get an error stating

    Recovery has indicated that there may be a lossy recovery option run recovery with the /a argument

    Do you have any idea what might be causing this

    Thanks
    Reply to this
  • Thursday, July 31. 2008 Ismail Mohammed wrote:
    Sorry Paul,

    I was on leave for few days so i was not able to check my mail. Can you update me the current status r u still facing the same issue if so let me know so that i can try my best to assist you.

    Regards
    Ismail
    Reply to this
  • Sunday, August 10. 2008 Luca wrote:
    Hi all, just a question:

    if the source goes down instead of a mailbox failure, what happens to cas/hub roles?

    If a user tries to access owa from external how could be redirected to the target cas mantaining the same https address?

    Is it possible in this scenario (2 servers with cas/hub roles) use NLB?

    Kind regards

    Luca
    Reply to this
  • Thursday, August 14. 2008 Ismail Mohammed wrote:
    hi mate,

    whether users can actually access their mailboxes after they have been moved from source mailbox server to SCR configured target server depends on Active Directory replication latency; that is, depending on the number of directory servers, it may take time for the update to propagate throughout the environment. In addition, client access methods matter. Messaging clients running Outlook 2007 and non-Outlook clients will have access to the user's mailbox after the directory servers used by the user's Client Access server have been updated with the new paths. Messaging clients running Outlook 2003 and earlier versions will require the user's desktop messaging profile to be updated with the new server name.

    For more information u can view this link as well : http://technet.microsoft.com/en-us/magazine/cc137735.aspx

    Regards
    Ismail
    Reply to this
  • Tuesday, September 02. 2008 Printer Toner wrote:
    I should learn more about servers. Where can I access this new feature?
    Reply to this
  • Wednesday, September 03. 2008 Ismail Mohammed wrote:
    Hi ,

    1) If you want to learn the features and installation of any MS product you can use microsoft Virtual Lab : http://www.microsoft.com/events/vlabs/default.mspx all you need to have good internet connection.


    2) you can create your own virtaul domain in the virtual pc or vmware where you can install the OS and server level application and test it out.

    One more thing : Thanks for your valuable feedback which you posted in my LCR article.

    Hope this should help you, incase if you are still unclear or would like to know more about this product please let me know...

    Regards
    Ismail Mohammed - MVP

    Reply to this
  • Thursday, September 11. 2008 Farook Ismail wrote:
    in SCR we have two copy of stores & storage, But what about the CAS & HUB Role,

    E.g. When Server1 Is gone down,
    what we have to done for Users mailbox & Access can get from server2
    Reply to this
  • Thursday, September 11. 2008 Ismail Mohammed wrote:
    Hi Mate,

    You need to have HUB, CAS & MBX in the target location.
    In my SCR Article - See the details from Figure 18 data.

    Regards
    Ismail Mohammed
    Reply to this
  • Thursday, September 11. 2008 Farook Ismail wrote:
    HUB & CAS Roles we have configure manually or It will get replicate automatically? And What is command after down Source Server activate Target server?

    Can you please help on this case.
    Reply to this
  • Friday, September 12. 2008 Ismail Mohammed wrote:
    Hi,

    When we are configuring the SCR topology...
    you need to have all server roles in one forest.

    In source server you might be having one hub, cas, mbx - with SCC, CCR or single mailbox but in the SCR atleast you should one server with HUB, CAS and mailbox either it can be one server or for each role one seperate server.

    When we are talking about SCR - it is used for only mailboxes.
    For hub & Cas - you need to network load balancer.

    in SCR :
    > Enable the SCR : Enable-Storagegroupcopy sourceserver\ssg -StandbyMachine Target Server
    >
    Create one database in the SCR server
    > Redirect the path of replicated data in the SCR to the created one.

    I can't give out complete command, please go through this link : http://exchangeserverinfo.com/2008/02/21/exchange-2007--high-availability-solution--standby-continuous-replication.aspx

    if you are still not clear after reading that article let me know i will glad to help you out

    Regards
    Ismail
    Reply to this
  • Monday, September 15. 2008 Farook wrote:
    I have configured SCR between two exchange server, also iahve tried by dismounting existing server database and excuting command which redirecting to new server database it's working fine,

    But after shutdown the existing server i can't execute he command

    "Error is ServerName OAB unavailable"

    i have done replication of OAB but problem is still presist.

    can you help on this
    Reply to this
  • Tuesday, September 16. 2008 Ismail Mohammed wrote:
    hi mate,

    I have replied to you on your email address, kindly reply to my email.

    Regards
    Ismail Mohammed
    Reply to this
  • Friday, October 24. 2008 Ismail Mohammed wrote:
    hi mate,

    What is current status of your server?

    Regards
    Ismail
    Reply to this
  • Friday, November 07. 2008 mohamed wrote:
    i swear, this article was very useful for me. after i try this article i have some questions, i hope that one off the experts guys can help me.
    How we can return back to the main office node after we fix it
    and how we can do this for public database
    how we can point from CCR to SCR server and return back to the main CCR office

    again thanks for your great effort
    and thanks for replaying my E-mail yesterday
    I hope for you all the best.
    Mohamed Khaled.
    Reply to this
  • Friday, November 07. 2008 Ismail Mohammed wrote:
    hi mate,

    for public folder see this link :
    http://technet.microsoft.com/en-us/library/cc164368.aspx

    If you want to revert it back again you have to perform manual steps

    regards
    Ismail Mohammed
    Reply to this
  • Friday, November 07. 2008 mohamed wrote:
    thanks brother,
    but can you send for me this manual steps which is i have to do to return back to the main node after i fix it.

    and this article don't have full steps how to fail over public folder for SCR

    and please send for me article how to fail over from CCR to SCR and return back from SCR to CCR
    Reply to this
  • Monday, November 10. 2008 Ismail Mohammed wrote:
    hi mate,

    i have not tried the lab on public folder for SCR. So that's y i have not put the detailed steps...
    I would appreciate if you first try to find the steps in the google and technet and let me know where you are stuck so that i can give you shadow support on this. Or else let me know what is your plan and how you are thinking to go with so that i can highlight wherever you going out of the line for this scenario...

    Still if you feel that your concern is not answered please revert back to me, i will be glad to assist you on this

    Regards
    Ismail Mohammed
    Reply to this
  • Monday, November 10. 2008 mohamed wrote:
    dear Ismail,
    thanks for your help.
    regarding the public folder, SCR don't provide any failover as you know public folder is removed from Exchange 2007 and microsoft replace it with share point server. that what i have found about public folder.
    Reply to this
  • Tuesday, February 03. 2009 Ramesh Ponnathota wrote:
    Hi,

    I am also facing the same error message, when I run the command eseutil/r e02. have got the solution for the same??

    I would appreciate if you share the solution..

    Ramesh Ponnathota
    Reply to this
  • Tuesday, February 03. 2009 Ismail Mohammed wrote:
    hi mate,

    can i know what is the error you are getting
    Reply to this
  • Friday, March 13. 2009 tim wrote:
    hi, Ismail Mohammed:
    1.in you lab, do you install passive clustered mailbox role in the target server? or do you install the normal mailbox role. ----i guest anwser is normal mailbox role.

    2. i thought the target server has to be in passive mode in order for scr to work. i am confused.in you lab, you kind of have two active servers. even though you did not active the storage group in the target server for scr. but can you create another new storage group which is not relative to scr in the target, and make it accessable to users. i mean can you have one scr storage group and one active storage group coexist?
    Reply to this
  • Friday, March 13. 2009 Ismail Mohammed wrote:
    hi mate,

    In SCR - The target server is a normal server, i have just re-directed mailbox configuration to SCR in case of database disaster recovery scenario. If you try to create a same storage group in the target it won't allow you to create it, that's y there is a need of some other name.

    Regards
    Ismail Mohammed
    Reply to this
Leave a comment

Submitted comments will be subject to moderation before being displayed.

 Enter the above security code (required)

 Name (required)

 Email (will not be published) (required)

 Website

Your comment is 0 characters limited to 3000 characters.