I keep getting a message like this. How might I debug / troubleshoot why this is being thrown?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
You can try Unlocker to look for file locking handles on the device. This program is also very useful for deleting things that Windows won't let you delete. Use with caution; the file was probably locked for a reason at some point (whether that reason is still valid or not, on the other hand...).
Process Monitor should be able to tell you what files are open, and so you can filter for the files open on the removeable drive.
Go to "Filter/Filter..." in the menu, select
Path from the dropdown menu, choose
Begins with, then enter the path for the removable disk in the criteria field. Make sure Include is selected in the next dropdown, and click
Check out Dev Eject. It does exactly what you want. Dev Eject shows you a list of all open files on a drive and the process that is accessing it.