As a rule of thumb, it's a good practice to place the Exchange databases in a dedicated location. By default, in Exchange 2013, 2016 and 2019 both the EDB file (the database itself) and the log files are created under:
Usually they are better be put on a separate volume as an iSCSI or NFS volume is easy to expand, backed up or snapshotted. As a side note, DAGs also need the path to the databases to match on all members.
Move database and log path
In this example we move a database called DB-test on server MAIL.alwayshotcafe.com from the default physical location to the E: drive, which is dedicated to Exchange database content. Original location:
PS C:\> Get-MailboxDatabase -Identity DB-test | fl EdbFilePath, LogFolderPath EdbFilePath : C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\DB-test\DB-test.edb LogFolderPath : C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\DB-test
We move the EDB file to the E:\ExchangeDatabases\DB-test\db folder. The log files will also have a separate folder, called E:\ExchangeDatabases\DB-test\logs.
PS C:\> Move-DatabasePath -Identity DB-test -EdbFilePath E:\ExchangeDatabases\DB-test\db\DB-test.edb -LogFolderPath E:\ExchangeDatabases\DB-test\logs Confirm Are you sure you want to perform this action? Moving database path "DB-test". [Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"): y Confirm To perform the move operation, database "DB-test" must be temporarily dismounted, which will make it inaccessible to all users. Do you want to continue? [Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"): y
Re-Mount the moved database
The last step is dismounting and remounting the relocated database. For that, we issue the following commands in order:
PS C:\> Dismount-Database -Identity DB-test -Confirm:$false PS C:\> Mount-Database -Identity DB-test

Comments