Read time: 6 minutes

Summary: One of the biggest concerns with the Exchange Server is its storage. Downtimes and performance issues become more frequent in the Exchange Server as the database size increases. If you’re struggling to remove white spaces in Exchange, stay tuned with this write-up as we’ll discuss ways to do that and explain Kernel for Exchange Server to handle Exhange Server related concerns. However, before we proceed, it’s essential to understand what white space is.

There can be several mailboxes in a single Exchange database consisting of an inbox, outbox, contacts, calendar, and other folders for each account. At the same time, by the addition of information in these mailboxes, the size of the database increases. But when the user deletes some content from mailboxes, it does not create a free space for new data. Let’s say that you remove 4GB of data from the 30GB Exchange database; the expected size of the database should be 26GB. But, after removing the data, you will notice that the size remains the same, which is 30 GB. However, there would still be 4 GB of space available to add new data. This ‘Available new mailbox size’ is commonly known as White Space.

More about White Space

Although Microsoft professionals suggest that it is not the accurate term to describe this space, most individuals consider it as White Space, as it is available but not visible. White Space is the free space area in Exchange databases, which is created after the deletion of an item or object (like a mailbox). White Space also known as free database pages or AvailableNewMailboxSpace, provides space to store new mailboxes or database. The Exchange database reuses the White Space to store new items and objects. However, it will not be visible, as said above. But you can reclaim this space manually by removing the white space.

  1. How to find White Space in Exchange?
  2. If you’re familiar with Exchange management shell and PowerShell commands, then there are three ways to find the white space in Exchange Database. You can use the below commands to find white space.

    • To check white spaces on a mailbox database, use:
      Get-MailboxDatabase < DB Name > -status | Select-Object Server,Name,AvailableNewMailboxSpace
    • To check white spaces on all mailbox databases on one server, use:
      Get-MailboxDatabase –Status –Server < servername > | Select-Object Server,Name,AvailableNewMailboxSpace
    • To check white spaces on all mailbox database on all server, use:.
      Get-MailboxDatabase -status | Select-Object Server,Name,AvailableNewMailboxSpace
  3. Create a new mailbox database
    • Open Exchange admin center.
    • On the windowpane, go to servers>databases.
    • Select + to launch a fresh mailbox database.
    • Name your database.
    • Tap Browse to select the server where you’ll create the database and then click OK after selecting the server.
    • Re-define the Database File Path and Log Folder Path. Click on the Save button.
    • This will show a warning message asking to restart the Microsoft Exchange Information Store Service. Click OK, and this will create and mount a new database.
    • Open Windows Services, then go to Microsoft Exchange Information Store>Restart the service.Microsoft Exchange Information Store>Restart the service.

    At the end, verify the configured database and log folder.

  4. Move the mailbox from one database to another
  5. Use the command below to move mailboxes from the source database to the target database.

    Get-Mailbox -Database “DB01” -ResultSize Unlimited | New-MoveRequest -TargetDatabase “DB02
  6. Delete old database
    • Open Exchange admin center (EAC) on your browser.
    • Go to servers>databases
    • Select Dismount in the list view to dismount the old database.
    • It will show you a warning message asking for confirmation to dismount the selected database.
    • Click Yes
    • Once you dismount the database, select the database you want to delete. Click the delete option (icon) to delete the desired database.
    • You’ll again see a warning message asking for your confirmation to delete the mailbox.
    • Click Yes to continue.
    • There is a warning message on your screen again suggesting to removing database as well as log files. Copy the given location and select OK.
    • Go to the file explorer and paste the given location. Delete the available files and you’re good to go.
Manual method to remove White Space in Exchange

There is only one way to remove white space from the Exchange database, which is by using Defragmentation. Now, this process can be carried out online and offline. Below, we have covered both methods in detail.

  • Online defragmentation: The online database defragmentation process is entirely automatic. You do not need to initiate it; Exchange will automatically run it every night. However, online defragmentation does not reduce the size of the database – it remains the same. It removes the expired messages. It also cleans up deleted mailboxes on the mailbox store. If you want to To reduce the size of the database, you should go for Offline defragmentation.
  • Offline defragmentation: Offline database defragmentation helps reduce the size of Exchange database. Using this process, you can compact the size of the database by eliminating unused storage space. This process creates a new database having no empty pages (it replaces the older ones with the new ones or deletes the older ones). You can perform defragmentation by use Eseutil facility. This process improves the efficiency of the Exchange database. But you can do this only when you have a large amount of free space.
Defragmentation of Exchange Database

You can defrag the White Space in the exchange database with a simple process, which we have described below.

  1. Before starting the defrags process, you should ensure that how much amount of white space is available in Exchange database with the below command in Exchange Management Shell.
    Get-MailboxDatabase < Database name > -Status | Format-List Name, DatabaseSize, AvailableNewMailboxSpace
  2. Now, after checking, you have to dismount your Exchange database.
    Dismount-Database < database name >
  3. Once you have dismounted the Exchange database, defragment the database
    Eseutil /d < database_name >
  4. Now run the defrag the dismounted database and mount the database again.
    Mount-Database < database name >
  5. After all the steps, check the white space available in your database after defragmentation.
    Get-MailboxDatabase < Database name > -Status | Format-List Name, DatabaseSize, AvailableNewMailboxSpace
Other Exchange Server issues

Apart from its large size, the Exchange Database can be affected by many other issues, including EDB file corruption. A corrupt EDB file becomes inaccessible to its users. So, the EDB files need to be repaired at the earliest. But you can try third-party Exchange Server recovery tools to fix such issues. Kernel for Exchange Server is an efficient tool for fixing all Exchange server issues, including corruption.

Conclusion

White space in the Exchange database can make it difficult for accommodating new data. Defragmentation can help in claiming such space, however, it might impact the database structure and cause data deletion. Kernel for EDB to PST, a third-party tool, is useful in overcoming the drawbacks of defragmentation and helps to recover the mailbox from the EDB file. The tool scans the offline Exchange database and saves the recovered data directly to Live Exchange.

Kernel for Exchange Server