Step by Step AutoReseed Configuration for a DAG in Exchange Server.
In this article I will show you how to configure AutoReseed for a Database Availability Group. Autoreseed – a feature that’s been designed to automatically restore database(s) after a disk failure onto a spare disk that has been provisioned on the system. If a disk fails, the database copies stored on the disk are mounted automatically to a spare disk on the Mailbox server.
How to configure AutoReseed?
1. The first step is to configure the root paths for the databases and the volumes. If you want to keep the default values this step can be skipped. In this example; the default paths are changed to:
- To see the default folder paths: Get-DatabaseAvailabilityGroup CKDAG1 | fl *auto*
- To set the path for databases: Set-DatabaseAvailabilityGroup CKDAG1 -AutoDagDatabasesRootFolderPath “C:\CKEXv15Dbs”
*** Change the DAG Name and the folder path accordingly.
- To set the path for volumes: Set-DatabaseAvailabilityGroup CKDAG1 -AutoDagVolumesRootFolderPath “C:\CKEXv15VOLs”
2. The second step is to configure the number of databases per volume. In this scenario I accepted the default value.
- To configure the number run: Set-DatabaseAvailabilityGroup CKDAG1 -AutoDagDatabaseCopiesPerVolume 3
- To verify the setting run: Get-DatabaseAvailabilityGroup CKDAG1 | select *auto*
3. The third step is to create the root directories for databases and volumes
- md C:\CKEXv15DBs
- Md C:\CKExv15VOL
- To verify run: Dir C:\
4. The next step is mounting the volume folders. This step should be completed for every volume (including the spare volumes) that will be used for databases.
- Create a folder under the root volumes folder. In this example it is C:\CKEXv15VOLs
- Created Volume 1 and Volume 2 folders.
- Launch the Computer Management select the disk, then ‘Change Drive Letters and Paths’
- Follow the on screen instructions and Finish. Then check the status of the empty folder you created in the above step.
- Complete same steps for every volume.
5. The fifth step is creating the database directories under the root path C:\CKEXv15DBs.
- Run: md C:\CKEXv15DBs\MbxARDB01 (Run this for every database directory.)
6. We are nearly there. The sixth step is creating the directory structure. Create the following directories by running:
- md C:\CKEXv15VOLs\Volume1\MbxARDB1.db
- md C:\CKEXv15VOLs\Volume1\MbxARDB1.log
7. Next configuration is creating the mount points for the database. For this I used the Diskpart utility.
- Open a command prompt and type ‘diskpart’
- To see the list of the volumes on the server type ‘list volume’
- Find the volume and its number that you would like to configure and type ‘Select Volume number’ In this example it is the volume number 3 hence I run ‘Select Volume 3′
- The last step is mounting the volume. For this run ‘assign mount:C:\CKEXv15DBs\MbxARDB01′
- To verify the above configuration steps run the following command:
- mountvol C:\CKEXv15DBs\MbxARDB01 /L
8. We are nearly there. The last step as you can imagine is creating the databases in the appropriate folder. You can either create the database(s) using the EAC (Exchange Admin Centre) or run the following command:
- New-MailboxDatabase -Name MbxARDB01 -Server CKLABEX01 -LogFolderPath C:\CKEXv15DBs\MbxARDB01\MbxARDB01.log -EdbFilePath C:\CKEXv15DBs\MbxARDB01\MbxARDB01.db\MbxARDB01.edb
- To verify the paths run the command you see in below picture
All DONE Before you go ahead with the testing you need to make sure the environment is ready. Another requirement!!! wait, this is an easy step. You need to create a MailboxDatabaseCopy of the newly created database on another DAG member. To do this and check the configuration afterwards see the picture below:
The database is now mounted on server CKLABEX01 and the copy is on CKLABEX06. Content Index State for both copies is Healthy and there are no logs waiting in the queue. Well I can hear the question? What NEXT? The next part is actually where we start our test by taking the disk that hosts Volume1 offline.
After simulating this disk failure I would expect the database getting mounted on the other DAG member, in our example this is CKLABEX06 and after that seeding should start and create the files under Volume2.
There you go…AutoReseed successfully completed and the seeding successfully created files under Volume2 which was initially configured as a spare disk. See below:
Volume 1 is not accessible and the database and log files are created under Volume2. Let’s do another check and verify the status using EMS. See below:
The AutoReseed copy is Healthy
You can also check the Event Logs for the AutoReseed job. You should see the following logs when the AutoReseed is successfully completed.
Hope you find the article helpful.