In this article, you will learn how to move database path log folder path in Exchange Server 2019 to another drive. After renaming the Exchange database, we would like to move the Exchange database to another drive. It’s good to know that we can quickly move the Exchange database path to another drive using PowerShell. It isn’t possible to do it in the Exchange Admin Center.
Before moving the database and log file to another drive, we recommend you configure the volumes as ReFS in Exchange. Once done, move the database and log files to the newly created ReFS volumes.
Table of Contents
Move Database Path
Standalone Exchange Server
If your Exchange Server is a standalone server, then you configure two separate disks. One disk is for your database, and the other disk is for your database logs.
Exchange Server DAG
If your Exchange Server is going to be a member of a DAG (Database Availability Group), configuring two disks isn’t required. You can have the database and logs on the same disk or separately.
Get Path Exchange Mailbox Database
Run the Exchange Management Shell as an administrator. Let’s get the path to the mailbox database by typing the following command:.
Get-MailboxDatabase | Format-list name, EdbFilePath, logFolderPath cmdlet
We have already renamed the mailbox database to DB01. However, the database (.edb file) and log folder still have a unique generated name. We will set up the name when we move both the “database and log folders” to another drive.
Move Exchange Mailbox Database to Another Drive
We will place the database and file logs from the same mailbox database on the same volume. I am just testing my lab environment.
We are using the Exchange Management Shell to move the database and log folder paths in Exchange 2019.
Follow the “Move-Databasepath” Cmdlet
Move-DatabasePath -Identity EXDB01 -EdbFilePath C:\EX-Database\EXDB01.edb
Type Y twice.
Note: It will dismount the datastore temporarily, which will cause you downtime.
If you need to verify that it has been moved successfully, then type the following command:.
Get-MailboxDatabase "EXDB01" | FL Name,*Path*
Verify via Exchange Admin Center
Click on your database, and then select the edit icon.
You can see the New Database Path
Conclusion
In this article, we learned how to move the Exchange mailbox database to another drive. We moved the Exchange database to another volume with PowerShell. Move the Exchange database path to another drive after working hours. Otherwise, the users with mailboxes in that database can’t connect to their email. Refer to this article to learn more about moving the mailbox database path.
Related: How to Backup and Restore Database