daknetworks.com

You are here: Blog Exchange 2013 Failed to Mount Database

Exchange 2013 Failed to Mount Database

TL;DR: http://mikepfeiffer.net/2010/04/getting-an-exchange-database-into-a-clean-shutdown-state-using-eseutil/


MY EXPERIENCE

Ughhh.... Users report that they can't access their email. Message is, "Microsoft.Exchange.Data.Stoarage.MailboxOfflineException"

Ok, so the Mailbox is offline. Why is it offline?

The database for the Exchange 2013 is broken into 3 different groups.

  • A-H
  • I-P
  • Q-Z

Databases I-P & Q-Z are working fine but database A-H won't mount.

Why won't it mount? It won't mount because it is corrupt.

How did it get like this? It got like this because EXCHANGE 2013 uses EDB files. It is a single file that stores everything. This file grows. Sooner or later it craps out. I'm not sure why but my guess is on NTFS.

If I check the EVENT LOG > APPLICATION, I see,

"Active Manager failed to mount the database Mailbox A-H. Error: An Active Manager operation failed. Error: The database action failed. Error: Operation failed with message: MapiExceptionDatabaseError: Unable to mount database. (hr=0x80004005, ec=1108)"

It gets worse, I'm also getting:
"Microsoft Exchange Information Store worker process (18152) has encountered and unexpected database error (Disk IO error) for database Mailbox A-H with a call stack of..."

And still worse:
"Database copy Mailbox A-H on this server appears to have a serious I/O error." "Service recovery was attempted by failover to another copy. Failover was unsuccessful in restoring the service. Error: There is only one copy of this mailbox database. Automatic recovery is not available."

And worse:
"Information Store - Mailbox A-H ; Database recovery/resotre failed with unexpected error - 1022"

And worse:
"Information store - Mailbox A-H: An attempt to write to the file "C:\Program Files\Microsoft\Exchange\V15\Mailbox\Mailbox Database 1889704935\Mailbox Database 1889704935.edb" at offset... bytes failed after 0.000 seconds with system error 665. The requested operation could not be complete due to a file system limitation. The writer operation will fail with error - 1022. If this error persists then the file may be damaged and may need to be restored from a previous backup."

All of this to say that the database is corrupt.

We got 2 options:

  1. restore from backup.
  2. repair database.

To repair:

  • cd \
  • cd \Program Files\Microsoft\Exchange Server\V15\Mailbox\Mailbox Database Foo\
  • eseutil /mh ".\database-name.edb"
  • eseutil /p ".\database-name.edb" /g

Then I moved all the log files away from Exchange log folder. First create a backup-directory, then move all the files into the backup-directory:

  • mkdir bkp
  • move * bkp

Then move the database-file.edb back where it came from:

  • cd bkp
  • move database-name.edb ..\

Now defrag the database-file.edb:

  • eseutil /d database-file.edb

Now check to see if the database-file.edb is OK:

  • eseutil /mh ".\database-name.edb"

Finally, mount the database:

  • $Mount-Database "database-name"

NOTE: you can run eseutil.exe /mh without effect. It is informational only.

In the end, it was easier to create a new database-name.edb and import the items needed via edbmails. Don't ask me why it took more than 24 hours to get to a solution that should have been the first option. This is exactly why I keep a note of items here.


MS SUPPORT

Luckily, I called MS support. So you get the short of the conversation without having to pay ;-)

-too many log files.

-database file is too large. It is 539GB.

-ran eseutil /mh ".\database-name.edb"

-error 1811. Bad news.

-stop MS Exchange Information Store

-uninstall Veeam Backup

-get-mailboxdatabase

-get-mailboxdatabasecopystatus *

-wait for the databases to mount.

-shows "Dismounted"

-event-viewer > application and they see the same errors I already found.

-uninstall some programs that might be accessing the file.

-ran eseutil /mh ".\database-name.edb"

-error 1032. This means it's being used somewhere.

-storagecraft was trying to mount it.

-stop storagecraft service

-ran ran eseutil /mh ".\database-name.edb"

-success

-see that the log-required is lengthy

-sequence is from E000015CD80 to E000015CDCF

-created new folder & moved the sequence into this new folder

-ran eseutil /ml ".\database-folder\new folder\E00"

-"no damaged log files were found"

-ran eseutil /r E00 /d ".\database-name\new folder" /l "new-folder" /S "new-folder" /a

-ran eseutil /r E00 /d ".\database-name\new folder" /l "new-folder" /S "new-folder" /i

-ran eseutil /mh ".\database-name.edb"

NEW PLAN

-copy the database-name.edb

-start a new database-name.edb (this will get everyone receiving email)

-repair the database-name.edb

-merge the file back into the new-database-name.edb

INFO GATHER

-get-exchangeserver | fl name,*admin*,*role*,*site*

-repair is 5-6GB per hour

-ran eseutil /p ".\old-database-name.edb"

-merge into new-database-name.edb


[PS] c:\users\admin> cd "C:\Program Files\Microsoft\Exchange Server\V14\Bin"

[PS] C:\Program Files\Microsoft\Exchange Server\V14\Bin>eseutil /r E00 /i /l 'Y:\ExchangeRestore\Mailbox Database' / 'Y:\ExchangeRestore\Mailbox Database'


FINDINGS

StorageCraft to the rescue again with Granular Recovery for Exchange.

Testing it out now...

OK, I'm back. The StorageCraft GRE is a good tool. It does what eseutil should do but makes it easy for the stressed out administrator. It also has the added benefit of having granular restore. You can restore just one email.

If you have the budget, I recommend it. It's way better than EDBMAILS and other software I've tried.

Contact Dak Networks

We are not taking on new clients at this time.