Share via


Configure AutoReseed for a database availability group in Exchange Server

APPLIES TO: yes-img-162016 yes-img-192019 yes-img-seSubscription Edition

Use the steps in this article to configure AutoReseed for a database availability group (DAG) in Exchange Server.

Caution

The AutoReseed feature doesn't perform any prerequisite configuration tasks for you. An administrator must manually install disks correctly, add spare disks to the system, replace bad disks, and format new disks.

For more management tasks related to DAGs, see Manage database availability groups.

What do you need to know before you begin?

  • Estimated time to complete this task: 10 minutes.

  • To open the Exchange Management Shell, see Open the Exchange Management Shell.

  • You need to be assigned permissions before you can perform this procedure or procedures. To see what permissions you need, see the "Database availability groups" entry in the High availability and site resilience permissions article.

  • A single logical disk/partition per physical disk must be created.

  • You must use the specific database and log folder structure described in the following steps in this article.

  • For information about keyboard shortcuts that apply to the procedures in this article, see Keyboard shortcuts in the Exchange admin center.

Tip

Having problems? Ask for help in the Exchange Server forum at Exchange | Exchange Server | Management.

Step 1: Configure the root paths for databases and volumes

The first step involves configuring the root folders for the databases (AutoDagDatabasesRootFolderPath) and volumes (AutoDagVolumesRootFolderPath) used by the DAG. The defaults are C:\ExchangeDatabases, and C:\ExchangeVolumes, respectively. You can omit this step if you're using the default paths.

This example illustrates how to configure the root path for the databases.

Set-DatabaseAvailabilityGroup DAG1 -AutoDagDatabasesRootFolderPath "C:\ExchDbs"

This example illustrates how to configure the root path for the storage volumes.

Set-DatabaseAvailabilityGroup DAG1 -AutoDagVolumesRootFolderPath "C:\ExchVols"

How do you know you successfully configured the root paths for databases and volumes?

To verify you successfully configured the root paths for databases and volumes, run the following command:

Get-DatabaseAvailabilityGroup DAG1 | Format-List *auto*

The output for AutoDagDatabasesRootFolderPath and AutoDagVolumesRootFolderPath should reflect the configured paths.

Step 2: Configure the number of databases per volume

Next, configure the number of databases per volume (AutoDagDatabaseCopiesPerVolume) for the DAG.

This example illustrates how to configure this AutoReseed setting for a DAG configured with four databases per volume.

Set-DatabaseAvailabilityGroup DAG1 -AutoDagDatabaseCopiesPerVolume 4

How do you know you successfully configured the number of databases per volume?

To verify successful configuration of the number of databases per volume, run the following command:

Get-DatabaseAvailabilityGroup DAG1 | Format-List *auto*

The output for AutoDagDatabaseCopiesPerVolume should reflect the configured value.

Step 3: Create the root folders for databases and volumes

Next, create the folders that correspond to the root folders you configured in Step 1. This example shows how to create the default folders in a Windows Command Prompt.

md C:\ExchangeDatabases

md C:\ExchangeVolumes

How do you know you successfully created the root folders for databases and volumes?

To verify successful configuration of the root folders for databases and volumes, run the following command.

Dir C:\

The created folders should appear in the output list.

Step 4: Mount the volume folders

For every volume that is used for databases (including spare volumes), use the Windows Disk Management application (diskmgmt.msc) to mount each volume in a mounted folder under C:\ExchangeVolumes. For example, if there are two volumes with databases and one spare volume, mount the volumes to the following mounted folders:

  • C:\ExchangeVolumes\Volume1
  • C:\ExchangeVolumes\Volume2
  • C:\ExchangeVolumes\Volume3

The names of the mounted folders can be any folder name, as long as the folders are mounted under the root volume's path.

How do you know you successfully mounted the volume folders?

To verify you mounted the volume folders successfully, run the following command.

Dir C:\

The mounted volumes should appear in the output list.

Step 5: Create the database folders

Next, create the database folders under the root path C:\ExchangeDatabases. This example illustrates how to create folders for a storage configuration with four databases on each volume.

md c:\ExchangeDatabases\db001
md c:\ExchangeDatabases\db002
md c:\ExchangeDatabases\db003
md c:\ExchangeDatabases\db004

How do you know you successfully created the database folders?

To verify you created the database folders successfully, run the following command.

Dir C:\ExchangeDatabases

The created folders should appear in the output list.

Step 6: Create the mount points for the databases

Create the mount points for each database and link the mount point to the correct volume. For example, the mounted folder for db001 should be at C:\ExchangeDatabases\db001. You can use diskmgmt.msc or mountvol.exe to do create and configure the mount points. This example illustrates how to mount db001 to C:\ExchangeDatabases\db001 using mountvol.exe.

Mountvol.exe c:\ExchangeDatabases\db001 \\?\Volume (GUID)

How do you know you successfully create the mount points for the databases?

To verify you successfully created the mount points for the database, run the following command.

Mountvol.exe C:\ExchangeDatabases\db001 /L

The mounted volume should appear in the mount point list.

Step 7: Create the database folder structure

Next, create two folders in the folders you created in Step 5:

  • A folder for each database.
  • A folder for each of the database's log stream stored on the same volume.

You must use the following format for your folder structure:

C:\<DatabaseFolderName >\ DatabaseName \<DatabaseName >.db

C:\<DatabaseFolderName >\ DatabaseName \<DatabaseName >.log

This example illustrates how to create folders for four databases stored on Volume 1:

md c:\ExchangeDatabases\db001\db001.db
md c:\ExchangeDatabases\db001\db001.log
md c:\ExchangeDatabases\db002\db002.db
md c:\ExchangeDatabases\db002\db002.log
md c:\ExchangeDatabases\db003\db003.db
md c:\ExchangeDatabases\db003\db003.log
md c:\ExchangeDatabases\db004\db004.db
md c:\ExchangeDatabases\db004\db004.log

Repeat the preceding commands for databases on every volume.

How do you know you successfully create the database folder structure?

To verify you successfully created the database folder structure, run the following command.

Dir C:\ExchangeDatabases /s

The created folders should appear in the output list.

Step 8: Create databases

Create databases with log and database paths configured with the appropriate folders. This example illustrates how to create a database stored in the newly created folder and mount point structure in the Exchange Management Shell.

New-MailboxDatabase -Name db001 -Server MBX1 -LogFolderPath C:\ExchangeDatabases\db001\db001.log -EdbFilePath C:\ExchangeDatabases\db001\db001.db\db001.edb

How do you know you successfully created databases?

To verify you successfully created databases in the appropriate folder, run the following command in the Exchange Management Shell.

Get-MailboxDatabase db001 | Format List *path*

Database properties that are returned should indicate that the database file and log files are being stored in the above folders.

How do you know you successfully configured AutoReseed for a DAG?

To verify you successfully configured AutoReseed for a DAG, do the following steps:

  1. Run the following command in the Exchange Management Shell to verify the DAG is configured correctly.

    Get-DatabaseAvailabilityGroup DAG1 | Format-List *auto*
    
  2. Run the following command to verify the folder structure is configured correctly (the following examples are the default paths; if necessary, substitute the paths for the paths you're using).

    Dir c:\ExchangeDatabases /s
    
    Dir c:\ExchangeVolumes /s