I've also created this guide as an eBook, which you can buy here
Create an IP-less DAG
Create the Witness
Server
**Note** I always run the Witness Share
on a server that runs Exchange Management Tools – that is not an
Exchange Server.
Stand
up a member server called something like EXCH-MGMT-WIT, and add the following
permissions:
Since the Witness Share resides on a non-Exchange server, you need to add the Exchange Trusted Subsystem group to the Local Administrators Group on the server - this means it cannot be on a Domain Controller since there are no local groups.
Create
the DAG and set the Witness Server to EXCH-MGMT-WIT on C:\DAG01FSW, by running
the following in the EMS:
New-DatabaseAvailabilityGroup -Name DAG01
-DatabaseAvailabilityGroupIPAddresses ([System.Net.IPAddress]::None)
-WitnessServer EXCH-MGMT-WIT.resourcedomain.com –WitnessDirectory “C:\
DAG01FSW“
Add Mailbox Servers to the DAG
Run
the following in the EMS:
Add-DatabaseAvailabilityGroupServer -identity DAG01 –MailboxServer "EXCH-MBX-02"
Add-DatabaseAvailabilityGroupServer -identity DAG01 –MailboxServer "EXCH-MBX-03"
Enable DAC (datacenter activation coordination) mode on the DAG to prevent split-brain syndrome during fail-back(s) by running:
Set-DatabaseAvailabilityGroup
-Identity DAG01 -DatacenterActivationMode DagOnly
Create DAG Mount Points
Perform the following steps on each Exchange server – it is very important that volumes and folders match exactly on each server.
You should already have your E: and F: Volumes presented to your servers as drives.
1.
On
the C: drive, create a folder called
EXVols – this folder will be used to
mount our E: (Volume1) and F: (Volume2).
2.
Next,
on the C: drive, create a folder
called ExDBs – this folder will hold
the Database mount points.3. Creating the Volumes
4. Within the ExVols folder, create two new folders called Volume1 and Volume2.
5. Open Windows Disk Management to mount our two volumes to our ExVols folders.
6. Right-click E: and select Change Drive Letter and Paths…
7. Click Add and browse to the location of the Volume1 folder – C:\ExVols\Volume1
8. Click OK, twice
9. Right-click F: and select Change Drive Letter and Paths…
10. Click Add and browse to the location of the Volume2 folder – C:\ExVols\Volume2
You should see the folders with Disk icons meaning they are now Mount Points.
Creating the Database
Folders
Under
the C:\ExDBs folder, create the new
Database folders for as many DB’s as you plan to have. In my case, we have 6,
so we’ll create the following folders:
C:\ExDBs\DB01
C:\ExDBs\DB02C:\ExDBs\DB03
C:\ExDBs\DB04
C:\ExDBs\DB05
C:\ExDBs\DB06
After you have your folders set, open an Elevated command prompt, and run:
mountvol
This
will list the available volumes for use.
In
our case we know the one we want is \\?\Volume{eeadb719-54af-4384-9c90-78dbf04acf86}\
because
we can see the folder Volume1 is mounted to it
Run
the following command to mount DB01:
Mountvol
DB01 \\?\Volume{eeadb719-54af-4384-9c90-78dbf04acf86}\
If
you go to your C:\ExDBs, you’ll notice the folder icon for DB01 has changed to
a mount point icon.
Now mount your other DB’s:
Mountvol
DB02 \\?\Volume{eeadb719-54af-4384-9c90-78dbf04acf86}\
Mountvol
DB03 \\?\Volume{eeadb719-54af-4384-9c90-78dbf04acf86}\
Mountvol
DB04 \\?\Volume{eeadb719-54af-4384-9c90-78dbf04acf86}\
Mountvol
DB05 \\?\Volume{eeadb719-54af-4384-9c90-78dbf04acf86}\
Mountvol
DB06 \\?\Volume{03cf7f78-ed05-4bb7-a4f0-0914f9575bdd}\
If you run mountvol again, you’ll see all DB’s mounted under the Volume1 folder.
Now
set up your Archive DB’s on Volume2 like the above.
Run
mountvol, and for my setup,
the F: Volume2 is \\?\Volume{b4d8eb69-2c04-11e6-80d8-806e6f6e6963}\
Run
the following commands to mount those Arch DB’s:
Mountvol Arch01 \\?\Volume{b4d8eb69-2c04-11e6-80d8-806e6f6e6963}\
Mountvol Arch02
\\?\Volume{b4d8eb69-2c04-11e6-80d8-806e6f6e6963}\
Mountvol Arch03
\\?\Volume{b4d8eb69-2c04-11e6-80d8-806e6f6e6963}\
Mountvol Arch04
\\?\Volume{b4d8eb69-2c04-11e6-80d8-806e6f6e6963}\
Mountvol Arch05 \\?\Volume{b4d8eb69-2c04-11e6-80d8-806e6f6e6963}\
Mountvol Arch06
\\?\Volume{b4d8eb69-2c04-11e6-80d8-806e6f6e6963}\
Creating the Database
Directory Structure
Next,
we’ll create database directory structure; each folder will have 2 folders
beneath it: one folder for the Database
.edb file and one for the Logs.
**Note** It is best practice to keep database and log files on the same volume, as long as it is separated from the System Volume. So, all DB’s and Logs will be on Volume1 and Archive DB’s and Logs will be on Volume2.
You
can create these folders directly from Volume1 (E:) or by going to C:\ExDBs\DB01
through DB06 (they will have the same folders).
In
E:\ExDBs\DB01, create a new folder
named DB01.db and new folder called DB01.log.
In
E:\ExDBs\DB02, create a new folder
named DB02.db and new folder called DB02.log.
In
E:\ExDBs\DB03, create a new folder
named DB03.db and new folder called DB03.log.
In
E:\ExDBs\DB04, create a new folder
named DB04.db and new folder called DB04.log.
In
E:\ExDBs\DB05, create a new folder
named DB05.db and new folder called DB05.log.
In
E:\ExDBs\DB06, create a new folder
named DB06.db and new folder called DB06.log.
Do
the same for your Archive Databases:
In
F:\ArchDBs\Arch01, create a new
folder named Arch01.db and new
folder called Arch01.log.
In
F:\ArchDBs\Arch02, create a new
folder named Arch02.db and new
folder called Arch02.log.
In
F:\ArchDBs\Arch03, create a new
folder named Arch03.db and new
folder called Arch03.log.
In
F:\ArchDBs\Arch04, create a new
folder named Arch04.db and new folder
called Arch04.log.
In
F:\ArchDBs\Arch05, create a new
folder named Arch05.db and new
folder called Arch05.log.
In
F:\ArchDBs\Arch06, create a new
folder named Arch06.db and new
folder called Arch06.log.
Create Mailbox Databases
We’ll
be creating our six Databases, and evenly distributing them across our servers.
DB01 and DB04 on Server01
DB02 and DB05 on Server02
DB03 and DB06 on Server03.
Create
the Databases by running the following cmdlets in Exchange Management Shell (EMS):
New-MailboxDatabase –Name DB01 –Server EXCH-MBX-01
–LogFolderPath C:\ExDBs\DB01\DB01.log –EdbFilePath
C:\ExDBs\DB01\DB01.db\DB01.edb
New-MailboxDatabase –Name DB02 –Server EXCH-MBX-02
–LogFolderPath C:\ExDBs\DB02\DB02.log –EdbFilePath C:\ExDBs\DB02\DB02.db\DB02.edb
New-MailboxDatabase –Name DB03 –Server EXCH-MBX-03
–LogFolderPath C:\ExDBs\DB03\DB03.log –EdbFilePath
C:\ExDBs\DB03\DB03.db\DB03.edb
New-MailboxDatabase –Name DB04 –Server EXCH-MBX-01
–LogFolderPath C:\ExDBs\DB04\DB04.log –EdbFilePath C:\ExDBs\DB04\DB04.db\DB04.edb
New-MailboxDatabase –Name DB05 –Server EXCH-MBX-02
–LogFolderPath C:\ExDBs\DB05\DB05.log –EdbFilePath
C:\ExDBs\DB05\DB05.db\DB05.edb
New-MailboxDatabase –Name DB06 –Server EXCH-MBX-03
–LogFolderPath C:\ExDBs\DB06\DB06.log –EdbFilePath
C:\ExDBs\DB06\DB06.db\DB06.edb
Do
the same for your Archive Databases:
New-MailboxDatabase –Name Arch01 –Server EXCH-MBX-01
–LogFolderPath C:\ArchDBs\Arch01\Arch01.log –EdbFilePath C:\ArchDBs\Arch01\Arch01.db\Arch01.edb
New-MailboxDatabase –Name Arch02 –Server EXCH-MBX-02
–LogFolderPath C:\ArchDBs\Arch02\Arch02.log –EdbFilePath
C:\ArchDBs\Arch02\Arch02.db\Arch02.edb
New-MailboxDatabase –Name Arch03 –Server EXCH-MBX-03
–LogFolderPath C:\ArchDBs\Arch03\Arch03.log –EdbFilePath C:\ArchDBs\Arch03\Arch03.db\Arch03.edb
New-MailboxDatabase –Name Arch04 –Server EXCH-MBX-01
–LogFolderPath C:\ArchDBs\Arch04\Arch04.log –EdbFilePath
C:\ArchDBs\Arch04\Arch04.db\Arch04.edb
New-MailboxDatabase –Name Arch05 –Server EXCH-MBX-02
–LogFolderPath C:\ArchDBs\Arch05\Arch05.log –EdbFilePath
C:\ArchDBs\Arch05\Arch05.db\Arch05.edb
New-MailboxDatabase –Name Arch06 –Server EXCH-MBX-03
–LogFolderPath C:\ArchDBs\Arch06\Arch06.log –EdbFilePath
C:\ArchDBs\Arch06\Arch06.db\Arch06.edb
**Note** You will get a Warning that The Information Store must be restarted after DB creation - this is by design. Exchange 2013/2016 uses different memory management so that store.exe does not use all available RAM. MS suggests DB creation is during maintenance window, since restarting the store.exe service dismounts databases active on that server…even though that is annoying.
Add Database
Copies
We
will use Postpone Seeding to allow the copy creation to finish before
seeding.
Note
the Activation Preference (AP),
which mounts the copy according to server:
DB
|
EXCH-MBX-01 -AP
|
EXCH-MBX-02 -AP
|
EXCH-MBX-03 -AP
|
DB01
|
1
|
2
|
3
|
DB02
|
3
|
1
|
2
|
DB03
|
3
|
2
|
1
|
DB04
|
1
|
2
|
3
|
DB05
|
3
|
1
|
2
|
DB06
|
3
|
2
|
1
|
ArchDB
|
EXCH-MBX-01 -AP
|
EXCH-MBX-02 -AP
|
EXCH-MBX-03 -AP
|
Arch01
|
1
|
2
|
3
|
Arch02
|
3
|
1
|
2
|
Arch03
|
3
|
2
|
1
|
Arch04
|
1
|
2
|
3
|
Arch05
|
3
|
1
|
2
|
Arch06
|
3
|
2
|
1
|
Run
the following cmdlets in the EMS to
create the DB copies according to activation preference:
**Note** Run each cmdlet separate on each
line.
Add-MailboxDatabaseCopy
-Identity DB01 -MailboxServer EXCH-MBX-02 -ActivationPreference 2
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity DB01 -MailboxServer EXCH-MBX-03 -ActivationPreference 3
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity DB02 -MailboxServer EXCH-MBX-03 -ActivationPreference 2
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity DB02 -MailboxServer EXCH-MBX-01 -ActivationPreference 3
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity DB03 -MailboxServer EXCH-MBX-02 -ActivationPreference 2
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity DB03 -MailboxServer EXCH-MBX-01 -ActivationPreference 3
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity DB04 -MailboxServer EXCH-MBX-02 -ActivationPreference 2
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity DB04 -MailboxServer EXCH-MBX-03 -ActivationPreference 3
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity DB05 -MailboxServer EXCH-MBX-01 -ActivationPreference 2
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity DB05 -MailboxServer EXCH-MBX-01 -ActivationPreference 3
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity DB06 -MailboxServer EXCH-MBX-02 -ActivationPreference 2
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity DB06 -MailboxServer EXCH-MBX-03 -ActivationPreference 3
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity Arch01 -MailboxServer EXCH-MBX-02 -ActivationPreference 2
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity Arch01 -MailboxServer EXCH-MBX-03 -ActivationPreference 3
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity Arch02 -MailboxServer EXCH-MBX-03 -ActivationPreference 2
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity Arch02 -MailboxServer EXCH-MBX-01 -ActivationPreference 3
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity Arch03 -MailboxServer EXCH-MBX-02 -ActivationPreference 2
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity Arch03 -MailboxServer EXCH-MBX-01 -ActivationPreference 3
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity Arch04 -MailboxServer EXCH-MBX-02 -ActivationPreference 2
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity Arch04 -MailboxServer EXCH-MBX-03 -ActivationPreference 3
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity Arch05 -MailboxServer EXCH-MBX-03 -ActivationPreference 2
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity Arch05 -MailboxServer EXCH-MBX-01 -ActivationPreference 3
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity Arch06 -MailboxServer EXCH-MBX-02 -ActivationPreference 2
-SeedingPostponed
Add-MailboxDatabaseCopy
-Identity Arch06 -MailboxServer EXCH-MBX-01 -ActivationPreference 3
-SeedingPostponed
Check Database file Creation
Go
to C:\ExDBs on Server01 and get the Properties on the folder, it shouldn’t
be taking up any space (should be 0 bytes) – this is because the data is
actually stored on Volume1 not on C:\.
Now
open C:\ExDBs\DB01\DB01.db and DB01.log and you should see the .edb file and the logs in their respective folders.
Delete default
databases from each server
Run
the following cmdlets in the EMS to
delete the default Databases:
Get-mailbox -database "default database name" –arbitration
Get-mailbox -database "default database name"
-arbitration | new-moverequest
-targetdatabase "new database name"
**Note** You’ll need to do this for each server (the
cmdlet can be run from one server though). Also change “default database name”
to the default database you are moving from, and the “new database” you are
moving to.
**Note** Exchange 2013/2016 creates a
mailbox for the admin account that is used for the install; you’ll need to move
or delete that mailbox before deleting the Default Database.
You
cannot use get-mailbox -database "db name" | new-moverequest
-targetdatabase "database name"
because the pipe somehow cannot connect to the First Administrative Group
You
must use new-moverequest -identity
"admin user alias" -targetdatabase "new database name"
After moving arbitration and admin mailboxes, delete the databases and delete the .edb files and logs from each server.
If
required for Unified Messaging, download and install any Exchange 2016 Language
Packs on each server from the following link:
Disable
Autoprovision on Archive DBs
Disable auto-provision on Archive databases, so your provisioning script doesn't put regular user mailboxes in those by letting Exchange pick the most available DB
Set-MailboxDatabase
"archive database name" -IsExcludedFromProvisioning $true
Start Database Copy Seeding
Since we created our databases with seeding postponed, we'll go ahead and start that operation now.
In the EMS, run the following cmdlets one by one:
Update-MailboxDatabaseCopy -Server EXCH-MBX-01
Update-MailboxDatabaseCopy -Server EXCH-MBX-02
Update-MailboxDatabaseCopy -Server EXCH-MBX-03
This should be fairly quick since nothing is in the DB's, though allow some time if you have a slow link between DAG nodes.
Create a New
Anonymous Relay Connector
If you need
printers and devices to be able to send anonymous messages through Exchange,
you’ll need a new Frontend transport
Receive Connector to allow those connections.
Run the
following in EMS:
New-ReceiveConnector
"Internal Anonymous Relay" -usage custom -bindings 0.0.0.0:25
-TransportRole FrontendTransport -RemoteIPRanges $connector.RemoteIPRanges
Set quotas on databases DB01-DB06 and Arch01-Arch06
Get-MailboxDatabase | Set-MailboxDatabase
-IssueWarningQuota 3GB
-ProhibitSendReceiveQuota 5GB -ProhibitSendQuota unlimited
**Note** You can set
whatever quotas you need, mine is just an example. You aslo must set the ProhibitSendQuota as it has to be populated, even if unlimited.
No comments:
Post a Comment