search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Posted in Exchange Server | 5 Comments | 30,458 views | 29/08/2010 20:29

If you followed, at the Part 1, I installed two CAS + Mailbox Server and two Hub Transport Server. At the second part, I’ll configure Database Availability Groups between my two Mailbox servers.

First of all, you have to install Failover Cluster feature from Server Manager. After that I need to create Database Availability Group. I have to choose a Witness server. Witness server should be Hub Transport server in a recommended environment. So I choose it as my first Hub Transport Server called EXGW01.

New-DatabaseAvailabilityGroup -Name 'RadoreDAG' -WitnessServer 'EXGW01' -WitnessDirectory 'C:\RadoreDAG'

You should execute this command on Exchange Management Shell. After the command, lets check our DAG.

As you see, I don’t have any member servers right now. I’ll join my Mailbox servers to DAG.

Add-DatabaseAvailabilityGroupServer -Identity 'RadoreDAG' -MailboxServer 'EXCAS01'

After adding first mailbox server, you can check your witness file directory. It should be created by Exchange DAG. Now let’s add second server to DAG. Also our cluster is created on Failover Cluster Manager.

But as you see there is no network right now. So we should add them.

Let’s see ipv4 status.

Get-DatabaseAvailabilityGroup | FL Name,*IP*
Name : RadoreDAG
DatabaseAvailabilityGroupIpv4Addresses : {}
DatabaseAvailabilityGroupIpAddresses : {}

So we don’t have any network for DAG. Let’s create them now.
We should have 2 different networks. One is Public, other one is Replication network. On my environment, I use Replication network as a Backup Network. I’ll backup my Exchange servers with Microsoft System Center Data Protection Manager 2010 using replication network.

My Public Network: 94.101.92.0/24
My Replication Network: 192.168.0.0/16

Now, it’s time to create networks. For public network:

New-DatabaseAvailabilityGroupNetwork -DatabaseAvailabilityGroup RadoreDAG -Name Internet -Description "Internet Network" -Subnets 94.101.92.0/24 -ReplicationEnabled:$False

For replication network:

New-DatabaseAvailabilityGroupNetwork -DatabaseAvailabilityGroup RadoreDAG -Name Backup -Description "Backup Network" -Subnets 192.168.0.0/16 -ReplicationEnabled:$True

After configuration of networks, we should configure Group IP.

Set-DatabaseAvailabilityGroup -Identity RadoreDAG -DatabaseAvailabilityGroupIPAddresses 94.101.92.10

Ok, now check the Failover Cluster Manager:

As you see our DAG name is active. Also our networks are active.

So now we can add our second server to DAG.

Add-DatabaseAvailabilityGroupServer -Identity 'RadoreDAG' -MailboxServer 'EXCAS02'

Ok, our second server is active on DAG.

After second server, also our witness file share is active.

I configured the DAG and networks. Next, I’ll create 3 different databases for customers.

New-MailboxDatabase -Server 'EXCAS01' -Name 'Database01' -EdbFilePath 'C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Database01\Database01.edb' -LogFolderPath 'C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Database01'
New-MailboxDatabase -Server 'EXCAS01' -Name 'Database02' -EdbFilePath 'C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Database02\Database02.edb' -LogFolderPath 'C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Database02'
New-MailboxDatabase -Server 'EXCAS01' -Name 'Database03' -EdbFilePath 'C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Database03\Database03.edb' -LogFolderPath 'C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Database03'

Let’s check our databases:

Get-MailboxDatabase

I created the databases. Now I should check databases status.

Get-MailboxDatabaseCopyStatus

We have to mount them:

Mount-Database -Identity 'Database01'
Mount-Database -Identity 'Database02'
Mount-Database -Identity 'Database03'

Lets check it again:

Now we can replicate them with other mailbox server:

Add-MailboxDatabaseCopy -Identity 'Database01' -MailboxServer 'EXCAS02' -ActivationPreference '2'
Add-MailboxDatabaseCopy -Identity 'Database02' -MailboxServer 'EXCAS02' -ActivationPreference '2'
Add-MailboxDatabaseCopy -Identity 'Database03' -MailboxServer 'EXCAS02' -ActivationPreference '2'

You may get this error when you try operation:

A source-side operation failed. Error An error occurred while performing the seed operation. Error: An error occurred w
hile processing a request on server ‘EXCAS01’. Error: Database ‘bb1e972e-a343-4cfe-8544-39f18facd816’ was not active on
source server ‘EXCAS01’.. [Database: Database01, Server: EXCAS02.vpool.radore.net]
+ CategoryInfo : InvalidOperation: (:) [Add-MailboxDatabaseCopy], SeedInProgressException
+ FullyQualifiedErrorId : E25C52CD,Microsoft.Exchange.Management.SystemConfigurationTasks.AddMailboxDatabaseCopy

Thats a replication issue. Don’t worry about it. Let’s make them available.

First check their replicate status:

Get-MailboxDatabaseCopyStatus -Identity 'Database01'
Get-MailboxDatabaseCopyStatus -Identity 'Database02'
Get-MailboxDatabaseCopyStatus -Identity 'Database03'

We have to start replication:

Resume-MailboxDatabaseCopy -Identity 'Database01\EXCAS02'
Resume-MailboxDatabaseCopy -Identity 'Database02\EXCAS02'
Resume-MailboxDatabaseCopy -Identity 'Database03\EXCAS02'

So let’s move default mailboxes to new DAG databases.

Get-Mailbox | New-MoveRequest -TargetDatabase "Database01"

To check Move Request status:

Get-MoveRequest

So if you see that as “Completed” than you can remove requests:

Get-MoveRequest | Remove-MoveRequest

Now it’s time to move hidden mailboxes. First see them:

Get-Mailbox -Arbitration

Get-Mailbox -Arbitration | New-MoveRequest -TargetDatabase “Database01”

Get-MoveRequest

Get-MoveRequest | Remove-MoveRequest

So we moved all default mailboxes. Now we can delete default mailbox databases.

'Mailbox Database 0342336127 (YOUR UNIQUE ID) ' | Remove-MailboxDatabase

We completed our steps. As a final step, let’s check replication health status.

Test-ReplicationHealth 'EXCAS01'

Test-ReplicationHealth 'EXCAS02'

Now we have 3 databases and a fully working DAG environment. At the next part, I’ll show you how to create mailboxes for customers. Then we will see how to backup databases with Data Protection Manager 2010.

Please continue with Part 3:

Hosted Exchange 2010 – Hosted Exchange 2010 Installation