7

Whenever I am trying to eject my external hard drive I am getting "Problem Ejecting USB Mass Storage Device" alert and it is not allowing me to eject the device safely.

(System : Windows 10 21H1 Build 19043.1081)

img_eject

So, I open the Event Viewer, look for the 225 Event ID, and found System with process id 4 is preventing the hard disk from eject.

img_pid_4

When I looked at the process id 4, using Process Explorer, found 3 processes running under the System causing the problem. (Interrupts, smss.exe, and Memory Compression). The problem is, killing those processes wouldn't work as they are part of the System process, and also it is not recommended to do so.

img_process_explorer

I looked at Microsoft community posts, they are saying a bunch of different things, from killing the process from task manager, disabling windows defender, uninstalling device driver to changing disk removal policy (Quick to better performance) yada, yada.. sadly none of them working. At this moment the best thing I can do, shut down the machine and remove the device but it is not the optimal solution...

Does anybody know, how to make it work?

6 Answers6

6

The one and only thing that is working for me - Setting the External device to Offline mode from the Disk Management and set it back to Online mode when needed.

img_Management

(However one issue I have noticed, If the device contains Windows System Image/Backup and if it is set to Offline mode, Windows is not recognising the device when it comes to the System Image Recovery process until I boot into Windows and set the device to the Online mode. Maybe it's happening only in my case, but it's worth mentioning)

3

As many people already discovered, selecting the "Quick removal" policy does not cure this problem at all.

Even after setting the policy for your external USB disk to "Quick removal" Windows will keep your disk busy for a long long time, due to its processes still using the disk. In my case the disk will be kept busy for 5 to 10 minutes if not longer, if some data got copied to or from it. Ejecting before this time will corrupt the data on the disk! So never forcefully unplug your drive within minutes even if the "Quick removal" policy has been selected! Many disks have an activity LED, which can be checked.

While in Linux you simply can "sync" disks, flushing data buffers in memory to disk, using a simple command, in Windows you can not.

The solution Mir Rahed Uddin mentioned should work, without corrupting data.

2

If you shut down the computer then it is safe to remove the drive.

Not always practical, but it works.

1

I would try ejecting the device more than once. This sometimes helps.

However, starting with Windows 10 v1809, USB devices are optimized for "Quick removal" by default.

This was announced by Microsoft in the post
Change in default removal policy for external storage media in Windows 10, version 1809:

Quick removal: This policy manages storage operations in a manner that keeps the device ready to remove at any time. You can remove the device without using the Safely Remove Hardware process. However, to do this, Windows cannot cache disk write operations. This may degrade system performance.

So unless you have modified the storage device policy setting to "Better performance", you just need to wait a few seconds and then unplug forcefully the drive. A shutdown is not required.

To check your setting: In Disk Management, right-click the device, select Properties, and verify the Policies tab.

harrymc
  • 498,455
1

I stopped having the issue after disabling the "Intel Rapid Storage Technology" service (IAStorDataMgrSvc), which I disabled after reading that it was only applicable to SATA drives (since I have no internal SATA drives on my machine).

grundt
  • 11
1

There's a PowerToys module called File Locksmith. Grab PowerToys from the Microsoft Store (if you haven't already), then under "This PC" right-click on the drive (then "Show more options on Win11), and click the file locksmith.
It will show all the processes using it in a nice, simple GUI with "End process" buttons next to each one.

Demonstration

resultant window

Markus Meyer
  • 1,910