Two different times now, when trying to “safely remove” a USB hard drive, I’ve had this error message pop up when I’m not actually accessing the drive.
I closed all open applications, even logged out to make sure that no user applications were open. When I logged back in and tried to remove the device, I got the same error message.
The Windows 2008 Resource Monitor tells me that the System process (process ID 4) has two files open on the device: F:\$LogFile (NTFS Volume Log) and F:\$Mft (NTFS Master File Table). Why it’s holding those files open when I told it to remove the device is beyond me. And I have absolutely no idea how to tell Windows to let go of the device.
I just realized that both times this happened, I was logged in to the machine via Remote Desktop. That shouldn’t be an issue, but it’s probably worth looking into. I know that I’ve removed drives via Remote Desktop before.
If anybody has a clue why this is happening, I’d sure like to hear about it.
Update Wednesday, August 27
It happened again yesterday, so I downloaded Process Explorer to see if I could get a little more information. Searching for handles to “F:\” produces these search results:
That tells me what handles are open, but it sure doesn’t give me much in the way of useful information. It seems like the remove hardware action should tell those services to let go of the handles.
There is a way within Process Explorer to force-close those handles, but attempting to do so results in a dire warning about possibly causing a crash or instability, and I wasn’t prepared at the time to crash my server. Closing the Remote Desktop window and logging in as Administrator at the machine’s console didn’t allow me to remove the drive. So I just pulled the plug. No ill effect.
After disconnecting the drive yesterday, I took it to the data center, copied some stuff to it, and brought it back here. I connected the drive, ran the program that copies data off the drive, and attempted to disconnect it again. That time it worked. As far as I recall, I performed the same steps as I always do. Why it worked this last time when it hasn’t worked previously is beyond me.