How to safely remove a device blocked by the System process with a handle on \$Extend\$RmMetadata\$Txf
I've always had this problem with one of my Toshiba external drives. I value that drive really high because of its built-in shock detector, what is currently very hard to find. But the cannot-remove-it-safely issue was driving me crazy.
Today, I've hit this question/thread on social-technet MS site. While there's a lot of noise down there, they point out a few common issues. Like the Distributed-Tracking service. It's actually hard to read through it all due to some cohones-size-flame-war that escalated at some point, but reading the topic from its end helps;)
Anyways, sorry for my chatty mood, I've just fixed my case permanently.
I've got any Distributed-Tracking/Windows-Search/etc services off and was still unable to safely-unplug the drive. Someone somewhere suggested that "quick removal" is the culprit, but almost all my USB drives run on it and I still can remove them safely.
However, I actually tried switching this drive to "high performance mode" and .. it caused the TxfLogContainerXXXX handles to evaporate. So, it's true that this is the quick-removal option. However, this did not released my drive yet. Still couldn't eject it.
Then I have went to ComputerManagement->DriveManagement utility and I have removed any drive-letter assignements for that drive. Instantly afterwards, I was able to eject the drive.
Then I tried connecting it again, reassigning the drive letter, switching it to quick-removal and it seems to work properly and still be ejectable.
On the so-long topic on MS site, they also mention these actions. Someone suggested to:
- change drive letters and reboot
- or, try turning the drive "offline"
I think that the "turn the drive offline" via "computer management -> drive management" might actually be the quickest solution, however I have not tried it since my random attempts helped before I've read about that.
For me, the issue was caused by having file-content indexing turned on on the drive (which is on by default)
To disable it:
Right click the drive > Properties > Uncheck Allow files on this drive to have contents indexed in addition to file properties
After disabling contents indexing, I was able to eject the drive.
I had the same problem and found indeed that turning the drive offline is the fastest option as @quetzalcoatl already said.
Still a small caveat: after you turned the drive to offline, you should flip it back to online else next time you attach the drive it won't start and be recognized by the system.
Below is a very small script to automate the process, inspired by this:
https://groups.google.com/forum/#!topic/alt.msdos.batch.nt/dRhFTCtLJ3A
@echo off
:loop
echo list disk|diskpart|find "Online"
set "disk=."
set /p "disk=Pick disk number above to put offline: "
echo.
echo list disk|diskpart|find "Disk %disk%"
if errorlevel 1 (
echo Invalid drive selection!
pause
goto :loop
) else (
pause>con
echo select Disk %disk%
echo offline Disk
echo online Disk
echo exit
)| diskpart
Remember to run the batch file as administrator, and to press a key after you selected the disk number.