By default, Microsoft Exchange Server will place the MailStore database in the installation folder as followed :
C:\Program Files\Micros
oft\Exchange Server\V15\Mailbox\Mailbox Database 0000000000\Mailbox Database 0000000000.edb
It may be suitable for small scale setup, however you may want to change it to a different path for various reasons when come to medium or large scale setup… especially for performance reasons (dedicated LUN, optimized file system unit allocation size, replicated geo localized block device storage, etc.). I would also recommend relocating to a dedicated drive even for small setups to avoid filling up the C drive… you can also benefit from the 64k filesystem unit allocation too!
To change it, simply open the Exchange management console (with administrative privileges).
WARNING! If you are doing this operation on an existing, production system, Exchange will dismount the database, which will be unavailable for all users. Also be aware of the time required to copy the DB to the new location…
If the database is replicated within a Database Availability Group, this procedure cannot be used.
You are now good to go for issuing the command to execute the relocation :
Move-DatabasePath -Identity "<MailboxDatabase_Name>" -EdbFilePath "Path_to_new_dababase"
Example : Assuming your database is named “Mailbox Database 0000000000” and the new path you’d like to have the database is “D:\Program Files\Micros
oft\Exchange Server\V15\Mailbox\Mailbox Database 000000000\Mailbox Database 000000000.edb
Move-DatabasePath -Identity "Mailbox Database 0000000000" -EdbFilePath "D:\Program Files\Micros oft\Exchange Server\V15\Mailbox\Mailbox Database 0909617501\Mailbox Database 0000000000.edb"
You will be prompt for confirming the action, just say yes (Y) :
Confirm Are you sure you want to perform this action? Moving database path "Mailbox Database 0000000000". [Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"): Y
NOTE : You may also want to relocate the logs to a different device as well. If you are running a very large cluster, you probably want to send them to flash storage instead.
This can be achieved by adding the “–LogFolderpath” parameter to the command suggested above :
–LogFolderpath "F:\Logs"
Example :
Move-DatabasePath -Identity "Mailbox Database 0909617501" -EdbFilePath "D:\Program Files\Micros oft\Exchange Server\V15\Mailbox\Mailbox Database 0909617501\Mailbox Database 0909617501.edb" -LogFolderpath "F:\Logs"