1

I have a bunch of USB hard drives, but it's very annoying to use them since it's extremely hard to safely eject them. I can of course pull the cable out but then the hard drive heads park abruptly and it's simply unhealthy for the hard drive and may cause problems when the computer is writing or reading while unplugging. When using the normal method to eject a drive I ALWAYS get this message:

enter image description here

Only after trying again and again for 10-20 times it sometimes actually ejects the drive and safely powers it down. I can't restart the computer, when shutting it down even, the disk just keeps spinning and even if I use disk manager to put the disk offline, often the same error pops up. This is one of the most annoying things ever, I seriously wonder why a USB stick can be ejected at any time but they never properly made ejecting hard drives doable. I can't even see anything having file handles on the drive with resource monitor, it's a complete mistery what the computer is using the drive for all the time keeping it from being ejected. It's super frustrating and I don't know why it only works sometimes. Bringing the disk offline works sometimes but it's very annoying because I have to open disk manager to do it first, and then when plugging back in I have to bring the drive back online again by hand. The disk can put itself to sleep after a couple minutes when setting up a power plan, but why can't this simply be done on command??

Is there any software that can let me ignore Windows and just safely power the drive down without needing to mess around with everything for 10 minutes? I just want to be able to click a button or two and have the disk receive the command to power down. does anyone know how you're supposed to do this?

4
  • 1
    I know of no magic software to do what you want. However, you might have success looking at what file handles are open using software like ofview (nirsoft.net/utils/opened_files_view.html). In the software you can filter what handles are open by putting the drive in the filter (e.g. D:\ ). Then right click and kill the handles. Of course, if a handle is writing to your disk, you risk corrupting a file the same as if you were to simply pull out the cable while writing. After closing all open handles for a drive, it may eject. DISCLAIMER: USE THE SOFTWARE AT YOUR OWN RISK.
    – Brian
    Commented Jun 25, 2023 at 19:26
  • 1
    Process Explorer (learn.microsoft.com/en-us/sysinternals/downloads/…) might also be useful if you know which processes are hanging causing your drive to be unmountable. I have personally had more success with ofview DISCLAIMER: USE SOFTWARE AT YOUR OWN RISK.
    – Brian
    Commented Jun 25, 2023 at 19:28
  • Hey @Brian, thanks for the reply! I love Nirsoft tools, they're always helpful. Process Explorer can do the same things as resource monitor does so it's a good option to see what is using the disk. I noticed when the disks fail to be ejected, it creates a log in event viewer that also shows the process and pid that's having a file handle on the disk. Thanks!
    – Foxyz
    Commented Jun 25, 2023 at 20:01
  • 2
    Does this answer your question? Can Windows tell me what is using my USB drive?
    – root
    Commented May 4 at 7:58

3 Answers 3

2

When you copy data over from or to your external harddisk, windows will show you a progress bar on the transfer.

Where you think you see the progress of data being copied from your hard disk to your external (or other direction), what actually happens is that the data is added to the cache of the drive. After the cache is filled, the harddisk contains all the data, and as such, the progress bar registers this as finished. But in reality, the harddrive itself is still copying files from the cache onto the actual location.

If you attempt to eject the disk while this is happening, windows will tell you that you cannot. If you do unplug the cable, you can be assured that you have now destroyed data on the disk.

Another option is that windows is performing maintenance on the disk, such as defrag, disk scanning for errors or even virus scanning. All operations access files in write mode, and that triggers the same message. Unless you use a program that actually writes to the disk, and this program keeps the disk running, unplugging the cable will be safe.

It is up to you though to consider if you want to wait or not and also to think what happened in the last 5 minutes. If you were writing data to the disk, you definitely don't want to disconnect the drive.

2
  • You're probably right, but this happens even when not transferring data. I figured one of the causes must be search indexing.
    – Foxyz
    Commented Jun 25, 2023 at 19:59
  • If you have not transferred anything in the last 30 minutes, then indeed, this is not from a transfer. But system maintenance can be a thing too. Search indexing won't do this unless you perform a search on the drive.
    – LPChip
    Commented Jun 25, 2023 at 20:24
0

I learned some causes to this. I put a lot of testing into seeing what stuff influences when a disk can be ejected.

First thing to do is to close Task manager, close all Explorer windows and Notepad. These are all often keeping the disk from being ejected for some reason. Blacklist the drive from search indexing. If all of this doesn't work, you can try putting the disk offine from disk manager, and if it still doesn't work you can actually go to Event Viewer > Windows logs > System and you can actually see warnings and errors that show the path to the .exe and the pid of the program that is keeping the disk from being ejected. Someone should write a program that reads these logs and automatically kills the processes by their id. I found logs from task manager, search indexer, and also a bunch of driver errors. I don't know what the driver errors are from.

0

It's highly recommended not to pull the plug on a busy USB disk, for risk of data lose or worse.

Windows 10/11 has Quick Removal as the policy for removable devices, so data is written out from the memory cache as fast as Windows can manage it. If the disk is busy, then Windows or some program is using it, so interrupting it may cause harm.

If you wish for a simpler user interface, try for example USB Disk Ejector.
Other tools exist, but the best ones are payware.

1
  • Thanks for the suggestion, this tool seems like it's perfect for the job. I'll give it a try!
    – Foxyz
    Commented Jun 25, 2023 at 22:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .