Thursday, August 16, 2012

How to tell what process is preventing my USB drive from ejecting

Results from the above query actually led to an answer, finally.

First of all, I found, downloaded, and tried DevEject, which has a nice GUI that identifies the reason why the "cannot eject xxxxx right now, try again later" message is coming up.

http://www.technostarry.com/windows/how-to-solve-usb-drive-is-in-use-problem-prevent-usb-locking/

http://deveject.com/

In my case, this led to the discovery, obvious in retrospect, that the TortoiseSVN cacheing process (tsvncache.exe) was the process grinding away in the directories on my USB backup drive. Further queries revealed that it's pretty easy to curtail this cacheing to just the directories on my main drive that I need it to show the SVN status of. This has the fortunate side effect of eliminating a lot of unnecessary system load as well. I am far from the first person to have had this problem, and there are lots of forum threads and web pages discussing how to do this:

http://assorted-experience.blogspot.com/2008/03/optimizing-tsvn-cache.html

Note that the above link hints that Process Explorer might have accomplished what DevEject does.

http://superuser.com/questions/69699/prevent-tsvncache-from-running

http://www.paraesthesia.com/archive/2007/09/26/optimize-tortoise-svn-cache-tsvncache.exe-disk-io.aspx