Directory removal after mailbox database is deleted in Exchange 2013

Posted on 2013-10-02
Medium Priority
Last Modified: 2013-10-02
We are in the process of migrating from Exchange 2007 to Exchange 2013.  All platforms have been built and are running as expected.

During the initial creation of the mailbox databases, one was created that will no longer be used.

I unmounted the database.  Then used the trashcan icon to delete the database.  I received the standard message that the database file would need to be removed manually (no surprise).

I navigate to the Mailbox directory, highlight the folder for the erroneous database and hit the delete key.  I get the standard "Are you sure..." message and click 'Yes'.

Much to my surprise, I get a warning that 'noderunner.exe' is accessing files in this folder.  Why?  I had the management console remove all references so I should be able to delete this.  I have rebooted to try and clear any active processes, but 'noderunner.exe' grabs it immediately.

As such, I can not remove this folder that Microsoft states I can.  What is the trick that is not documented to allow for the deletion of this folder?
Question by:wrogge
  • 3
  • 3

Expert Comment

by:Sumit Gupta
ID: 39539816
To clear the file lock you can restart the HostControllerService service using PowerShell.

PS C:\> Restart-Service HostControllerService

You should now be able to delete the files and folders successfully.
Or you can also do service stop > Delete file > start service from Run> Services.msc

Stop-Service HostControllerService.
Delete the file.
Start-Service HostControllerService.

Author Comment

ID: 39539965
That is very confusing.  YES, that did resolve the issue, however, why wouldn't a platform reboot accomplish the same results?

Expert Comment

by:Sumit Gupta
ID: 39539982
The issue is that even though the database has been removed the search/index files are still locked by the noderunner.exe process and can’t be deleted.

noderunner.exe is a child process of the Microsoft Exchange Search Host Controller (HostControllerService) service. Even I'm not sure about why it keep searching the file but Me also resolved this kind of issue like this on my server.
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.


Author Comment

ID: 39540007
Apparently, I have spoken too soon.

Yes, stoping the service and removing the folder was successful.  However, starting the service has caused the folders to be recreated.

As sumitgupta85 stated, it is the result of the 'search/index' files are still in use and are recreated.

So, I will need to restate my question.

How can I eliminate the erroneous mailbox database from the search/index functionality that noderunner.exe has stored within the system so the folder can be removed permanently?

Accepted Solution

Sumit Gupta earned 1500 total points
ID: 39540026
I can be generated again if you create a database or database copy in that path again.

This looks like a Microsoft bug.

I my case it didn't came back. Some says that its fixed in exchange 2013 cumulative update 1. So i suggest you to update your server with cumulative updates.

Author Closing Comment

ID: 39540137
Nice to see I am not crazy.  I'll go for CU1.  Thanks.

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

In this post, we will learn to set up the Group Naming policy and will see how it is going to impact the Display Name and the Email addresses of the Group.
This article explains how to move an Exchange 2013/2016 mailbox database and logs to a different drive.
Watch the video to know how one can repair corrupt Exchange OST file effortlessly and convert OST emails to MS Outlook PST file format by using Kernel for OST to PST converter tool. It can convert OST to MSG, MBOX, EML to access them. It can migrate…
To export Lotus Notes to Outlook PST or Exchange and Domino Server files to Exchange Server or PST files with ease, go for Kernel for Lotus Notes to Outlook conversion tool. Through the video, you can watch the conversion process. A common user with…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question