-->

Thursday, January 2, 2014

Recovering an Exchange 2010 Server: DAG Member

This post is a follow-up to my previous post on Recovering a CAS/HT Serverhere I'll show you how to recover a 2010 Mailbox server that's part of a DAG.
Prep

Install the OS


First, either create a new VM or set up a physical server (you can reuse the failed server if you've fixed the problems) and install Windows Server 2008 R2 Enterprise.

**Note** Since this is a DAG node, it requires the Enterprise version of Server 2008 R2 which supports clustering.

Configure the IP

You have to set the new server’s IP address to be the same as the old server.

Reset the computer account of the old Exchange Server

Make sure you do not delete the computer account but, reset the account in AD.

Install the Mailbox server’s roles/features

Mailbox and Hub Transport servers require the Office Filter Pack which you can grab
here.

After you've installed the Filter Pack, run the following command in PowerShell:


Import-Module ServerManager

To install the typical Exchange 2010 server roles, in PowerShell, run:


Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -Restart

The server will bounce automatically by using the –Restart switch.

After the restart, in PowerShell, run:


Set-Service NetTcpPortSharing -StartupType Automatic

Next, run MS Update to patch the server.

Before installing Exchange on the new server you'll need to remove the failed server from the DAG.  
First, find which databases the server was hosting a copy of, the activation preferences, and any replay lag that was configured.


On another Exchange 2010 server open the Exchange Management Shell and run:

Get-MailboxDatabase | fl name, servers, activ*, *lag*

Next, remove the failed server from each of the mailbox databases that it held a copy of.

Remove-MailboxDatabaseCopy "Mailbox Database Name 01\Server Name"

Remove-MailboxDatabaseCopy "Mailbox Database Name02\Server Name"


**Note** Replace the "Mailbox Database Name" listed in the previous command and "Server Name" will be the failed server.

**Note** Warnings will appear because Exchange can’t communicate with the failed server, but you can confirm the change by running Get-MailboxDatabase | fl name, servers, activ*, *lag* again.

Next, remove the failed server from the Database Availability Group by running:


Remove-DatabaseAvailabilityGroupServer -Identity "DAG" -MailboxServer "Server Name"

**Note** Replace "DAG" with your DAG Name and "Server Name" with the failed server

Recovering the Mailbox Server

Now that you've installed the pre-reqs, proceed with the recovery.

Grab your Exchange Server 2010 SP1/2/3 DVD or browse to the extracted folder

**Note** The setup files will need to match the currently installed version or it will throw errors.

Fire up an Elevated Command Prompt and execute setup.exe from the installation binaries with the /m:RecoverServer switch.


setup /m:RecoverServer

Once you’ve run setup.exe, you’ll see it go through the pre-req checks and then it will install the Mailbox role

When the setup finishes, reboot the server.

After the reboot, check your Services and ensure that the automatic ones start up correctly. 


After you've checked services, add the recovered server back in to the DAG by running:

Add-DatabaseAvailabilityGroupServer -Identity DAG -MailboxServer "Server Name"

**Note** Replace "DAG" and "Server Name" Then, re-add the mailbox database copies to the recovered server according to truncation lag times and activation preferences that were earlier identified. This can take a while depending on the size of the databases that need to be reseeded.

Add-MailboxDatabaseCopy -Identity "Mailbox Database Name 01" -MailboxServer "Server Name"

Add-MailboxDatabaseCopy -Identity "Mailbox Database Name 02" -MailboxServer "Server Name" -ActivationPreference 1

**Note**Again, replace the database and server names

Verify that the databases have the same settings that were identified earlier:


Get-MailboxDatabase | fl name, servers, activ*, *lag*

Post Mailbox Server Recovery

Test all Exchange services like internal/external email, OAB, public folders, free/busy, etc.

Check the Event Logs and make sure there are no major errors.

That's it, your DAG node should be back to normal operation!
 

No comments:

Post a Comment