skip to Main Content

Move Exchange 2016 database to another drive

After renaming the Exchange 2016 database, we like to move Exchange 2016 database to another drive. We can only move Exchange 2016 database path to another drive with PowerShell. It’s not possible to do it in the Exchange Admin Center. In this article, you will learn how to move Exchange 2016 database to another drive.

Before moving Exchange mailbox database to another drive

Before moving the database to another drive, it’s recommended to have the volumes and disks configured. If it’s a standalone Exchange Server, configure two separate disks. One disk is for the database and the other disk is for the database logs. If the Exchange Server is going to be a member of a DAG, configuring two disks is not required. We can have the database and logs on the same disk or separate. It’s recommended to have the volume in the disk configured as ReFS. Read how to configure ReFS volume in Exchange. After that, move the database and logs to the created ReFS volumes.

Best practice: For recoverability, move database (.edb) file and logs from the same database to different volumes backed by different physical disks. Read more: Exchange database best practices.

Get path Exchange mailbox database

Run Exchange Management Shell as administrator. Let’s get the path of the mailbox database. We are going to use the Get-MailboxDatabase cmdlet.

The name of the database is already changed to DB01. Read the article how to rename Exchange 2016 database. The .edb file (database) and log folder do still have the unique generated name. We will configure the name when we move both the database and log folder to another drive.

Move Exchange mailbox database to another drive

In our example, we are going to place the database file and logs from the same mailbox database to different volumes. The volumes are configured on both different physical disks. The E: drive is the database disk and the F: drive is the logs disk.

Move Exchange 2016 database to another drive before move

We are going to make use of the Move-DatabasePath cmdlet. The EdbFilePath parameter specifies a new file path for the database. All current database files are moved to this location. The LogFolderPath parameter specifies the folder where log files are stored. After running the command, confirm both times with Y and press Enter.

Important: The database will dismount, the files are being moved to the new location. After the files finished moving, the database is mounted. This will happen automatically. The time of the operation depends on how much data there is to be moved. The users that are configured in the mailbox database will have no access to their email. It’s recommended to do this after business hours.
Let’s check if the folders are created and the files have moved to each of the disks.

Results after moving Exchange 2016 database to another drive

The database file is renamed and showing up in the new disk volume, including the content index folder. The content index files are located in the same path as the database EDB file, in a sub-folder named with a GUID.

Move Exchange 2016 database to another drive after move database volume

The database logs are moved to the new disk volume.

Move Exchange 2016 database to another drive after move logs volume

To clean up the old database folder, browse to the old path of the database. Right-click the folder and click delete.

Move Exchange 2016 database to another drive after move delete old folder

If you get a warning that the folder or file is in use, restart the following services in PowerShell. You should be able to delete the folder.

Check the results with PowerShell.

Conclusion

In this article, you learned how to move Exchange 2016 database to another drive. It’s only possible to move Exchange database and log folder of the mailbox database to another drive with PowerShell. Move Exchange database path to another drive outside business hours. Otherwise, the users with a mailbox in that mailbox database are not able to connect to their email. Did you enjoy this article? You may also like to read Enable circular logging Exchange 2016. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Connect with ALI TAJRAN on social media. Read more »

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top