Going to the system tray and trying to safely remove the external USB drive fails with message "The device is currently in use. Close any programs or windows that might be using this device, and then try again."
Albeit a common problem in other version of Windows, my previous experience overcoming this issue involved identifying processes or open files that needed stopped or closed. Today on this Win2012 box using both the Systernals Process Explorer and third party Unlocker utilities shows NOTHING holding the external drive from being ejected. Additionally the drive is set with write caching disabled aka quick removal. So what gives? No Quotas or Volume Shadow Copy features enabled. I've gone down the list of running services stopping any that seem related and still I can't remove the drive.
It is impractical to rotate drives by shutting down the server. This is especially the case since it is a HV Parent and so would likewise require taking offline the hosted VM's.
since posting this I've learned that running Process Explorer "As Administrator" has yielded process entries for the targeted drive letter using the "Find" function for Handle or DLL substring ...
all are under (where X is the drive letter of the external drive):
- x\$Extend\$RMMetadata\TXfLog (3 items)
- x\$Extend\$RMMetadata\TXf (1 item)
according to the Microsoft reference these are NFTS transactional related (...again why if no transaction is occuring?)
- Edited by Dale DU-IT Thursday, October 25, 2012 7:02 PM
using above information with the steps located here at this link http://answers.microsoft.com/en-us/windows/forum/windows_7-hardware/problem-ejecting-usb-mass-storage-device-this/1863c012-ff54-e011-8dfc-68b599b31bf5 I attempted to close the 'handle' ;however, that didn't work so well.
Here's the result:
so far the best I've been able to widdle things down, disabling one or all of the following services eventually allows for the safe removal of the drive:
- Distributed Link Tracking Client (DLTC)
- File Server Resource Manager
this discovery is supported deep into a locked thread by a comment by Chris Dahlberg from Friday Feb. 19, 2010 (about 2/3 down)
his report as also experienced firsthand is that with the DLTC service stopped the ~\$Extend\$RMMetadata\~ handles are still in use but the drive allows for safe removal
**clearly this is a big PITA issue that has gone on from OS version to OS version insufficiently recognized and addressed - please Balmer make it go away!
- Edited by Dale DU-IT Thursday, October 25, 2012 8:05 PM
If this handle won't be released since you have copied them, you can try to copy one file on your desktop, don't past. So the system will release the handle.
Or Backup Application not releasing Disk handle, so restart the 3 services maybe a workaround for this issue.
“Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.”
I also have this problem with windows 7,(found this page searching for an answer). Seen a lot of posts around regarding it. Perhaps Microsoft would care to fix it. Especially as I don't have this problem with my XP desktop with the same drive. These bodge/work-round solutions on forum pages don't do much for the company's image. They sugggest Microsoft can't be bothered and don't care.
This is ridiculous. The marked "Answer" is not an answer. Arthur_Li should undo his mark. Workarounds are not good answers, particularly when they don't make sense.
I have been experiencing this problem "randomly" with the same USB flash drive, or different USB flash drives for several years with Win7 Pro x64. I eventually reboot to remove the drive. It's very annoying. Since converting others in the company to Win7, I now hear from others in the company with the same problem. Running process explorer shows 4 "hidden" handles open on the USB drive. All are in X:\$Extend\RmMetadata\$Txf and ...$TxfLog.
Even better - using process explorer to try to close the handles does not work - "Invalid handle" !?
Seriously. Why are these handles still in use? We simply want to eject the drive. I have not yet run into this problem on Windows Server 2008R2, but if I had as the original poster, I would be quite steamed. Rebooting a server to eject an USB drive is unacceptable.
I have turned off indexing on every USB drive I have to prevent that possibility. Now I'm going to try turning of the recycle bin for the USB drive, but I'm not going to hold my breath.
Please fix this problem. Please.
Note - I have never seen this problem on Linux. :-)
On Win 2008 R2, I have been able to eject a problematic Seagate USB external hard drive exhibiting these same symptoms. Go to Disk Management, right-click on the USB disk in the graphical list (on the left side label near the text "Online"), and choose Offline. Then proceed to the system tray icon to "Safely Eject". It should be successful now and you can unplug the drive.
- Proposed as answer by bcarter27 Thursday, July 10, 2014 4:47 PM
BCarter27 : THANKYOU!!! This issue has bugged me for YEARS. Every time I have this issue it is Windows Explorer that is the culprit process !!! Seriously !!! Come on MSFT !!! This issue has been around for YEARS and you still can't be bothered to fix it !!!
"File Unlocker" indicates that Explorer.exe has "F:\" locked. WHY !!!!!
NOTHING would get Explorer to release the lock, not even killing the process (since it immediately restarted and locked it again).
Your solution worked like a charm.
Unbelievable MSFT, even for you.