Even with the widespread availability of multi-terabyte hard disks, Exchange Server can consume an excessive amount...
of disk space. It's important to promptly deal with the problem of low disk space. Otherwise, mail flow could stop and the mailbox database could dismount.
Even though there are several things you can do to cope with a disk space consumption problem, you shouldn't take the easy way out. I've seen a number of Internet message board posts suggest that if Exchange runs in a virtual server, you should expand the virtual hard disk and go into the guest operating system to convert the basic disk to a dynamic disk to expand the volume. This approach sounds good in theory, but it might not always be the best option. Microsoft supports the use of dynamic disks for Exchange 2013 mailbox servers, but the best practices guide states that basic disks should be used.
Delete data from full databases
One of the easiest ways to reduce disk space consumption is to delete data from the databases on the volume running low on space. It isn't usually practical for an administrator to simply delete data; it's far more effective to put quotas in place that force users to get a handle on their own mailbox data.
It's worth noting that simply deleting mailbox or public-folder data will not shrink the database and reduce disk space consumption. To get the disk space back, you must perform an offline defragmentation. An offline defragmentation optimizes the database and reclaims unused disk space locked away in the database. As the name implies, an offline defragmentation requires that the database be dismounted.
The other problem with performing an offline defragmentation is that doing so requires quite a bit of disk space. When you initiate the offline defragmentation process, Exchange actually creates a temporary database. As the process continues, the primary database copies data to the temporary database. This means you must have enough free disk space to accommodate both database copies and a little bit of extra space to accommodate overhead.
Make a backup of your database before initiating the defragmentation process. You can perform an offline defragmentation by running the following command:
ESEUTIL /D <database name>
Adjust recovery limits
Another way to reduce disk space consumption is to adjust the mailbox database's limits. Open the Exchange Administrative Center, select Servers, then the Databases tab. Select a database and click the Edit icon before clicking on Limits. The Limits screen lets you adjust the threshold for keeping deleted items and mailboxes. You might be able to temporarily regain some space by adjusting these limits.
Change the database path
In many cases, the only long-term option to recovering disk space is to change a database's path. This approach is especially effective if multiple databases are stored on the same volume. By changing a database path, you can move the database to a volume with plenty of free space.
Run database maintenance
Exchange Server runs a nightly maintenance cycle designed to keep the databases healthy. Some of the tasks performed during this maintenance cycle include:
- Database defragmentation
- Database checksumming
- Page patching
- Page zeroing
- Dumpster cleanup
- Public folder expiry
- Deleted mailbox cleanup
The maintenance cycle performs some important tasks, but it's common for the cycle to run out of time before completing each night. Check your server's logs to determine whether the cycle finishes. If you find the cycle is not finishing, you can adjust its schedule to give it more time.
In Exchange Server 2013, the maintenance schedule is set on a per-database basis. You can adjust the maintenance schedule through the Exchange Administrative Center by clicking on Servers and selecting the Database tab. Select the database that you want to configure and click the Edit icon followed by the maintenance link.
Remember: Even though the cycle defragments the database, an online defragmentation does not reclaim disk space. For that, you must perform an offline defragmentation.
About the author:
Brien Posey is an eight-time Microsoft MVP for his work with Windows Server, IIS, Exchange Server and file system storage technologies. Brien has served as CIO for a nationwide chain of hospitals and health care facilities, and was once responsible for IT operations at Fort Knox. He has also served as a network administrator for some of the nation's largest insurance companies.
Dig Deeper on Microsoft Exchange Server Storage Management