<

Move Mailboxdatabase and other logs to different drive in Exchange 2013/2016

Published on
5,490 Points
490 Views
Last Modified:
MAS (MVE)
Exchange Server, Windows Server, Active Directory, Virtualization, Skype for Business Expert.
This article explains how to move an Exchange 2013/2016 mailbox database and logs to a different drive.

When Exchange Server 2016/2013 installation is completed it creates a database on the server. If you installed Exchange to the default path then the mailbox will be stored in C:\Program Files\Microsoft\Exchange Server\V15\Mailbox.


To get the details of the current location please use the below command.

Get-MailboxDatabase | fl Name,EdbFilePath,LogFolderPath



The default location can create problems in future if your server HDD is not properly sized. Another common scenario is that the database will grow and the current volume ends up being too low on free disk space, so you'll need to move it to a new, larger volume. It is always recommended to have database and logs on different drives other than OS drive. So you would likely want to move this database to the volumes that you've provisioned for your Exchange database and log files. 


Before you proceed, consider that the move requires the database to be dismounted and taken offline, so it will not be accessible to your mailbox users during the move. This is fine if the server has just been set up and there are no mailboxes on it, but if you're moving a database with active mailbox users, a better option would be to create a new database on the new volume and perform the mailbox moves which means zero downtime. The command shown below will help you move to a different database in bulk.


Get-Mailbox -Database “Source Database Name” " -ResultSize Unlimited | New-MoveRequest -TargetDatabase “Target Database Name”


Do not forget to clear the move request once all move requests are completed. You can check the move request status by using the command below 


Get-MoveRequest


The next command will remove all completed move requests.


Get-MoveRequest | where {$_.status -eq “Completed”} | Remove-MoveRequest


Before I move the database, I am first going to rename it. The uniquely generated name of “Mailbox Database 0430860505” is not desirable so I will rename it to “MailboxDatabase-01” instead.


Set-MailboxDatabase "Mailbox Database 0430860505" -Name "MailboxDatabase-01"


This is the command to move the mailbox database to another drive and rename the EDB file name while moving.


Move-DatabasePath MailboxDatabase-01 -EdbFilePath D:\Mailboxdatabases\MailboxDatabase-01.edb -LogFolderPath E:\Logs\MailboxDatabase-01


The database will be temporarily dismounted, the files are copied to the new locations, and then the database is mounted again. The time this operation takes will depend on the size of the database and size of the logs, as well as the speed of the source and destination disks. 


Generally speaking, the more data you have the longer it will take, In short, a very long outage for your users if your database is big, hence why I recommend considering moving mailboxes to a new database instead.


We are now done with the mailbox database and its logs movement.


Now there are cases where C drive space is used because of connectivity logs, Message tracing logs and IIS logs.

You can change this from the GUI. Go to Servers-->Click Server name and click Edit/pencil button--> Transport logs.

See the following Screenshot.



We are now set with the transport log location.


Now next chance for logs is IIS logs i.e. C:\inetpub

You can change the location from IIS as below. 


Default Website



Here you can use either the browse button or type the desired path manually.


Click on Apply.


Exchange Backend



Here you can use either the browse button or type the desired path manually.


Click on Apply.


We have now moved mailboxdatabase, Databaselogs, Transport logs and IIS logs to a different drive.


Need more support on this topic? 


You are encouraged to use the "Ask a Question" feature of Experts Exchange to ask for more help. I monitor asked questions at EE in an expert capacity and will be glad to offer additional assistance, as will many other experts on this topic.


Thanks for reading my article.


0
Comment
Author:MAS (MVE)
0 Comments

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Join & Write a Comment

To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month