Can't "safely remove" external hard drive, dllhost.exe holding lock

Page 1 of 2 12 LastLast

  1. Posts : 21
    Windows 10
       #1

    Can't "safely remove" external hard drive, dllhost.exe holding lock


    Hi

    I have an external hard drive that is almost permanently plugged into my laptop to do a daily scheduled backup. The "safely remove" option never works though, I always get the "This device is currently in use" error.

    I ran Process Explorer and searched for the drive letter. I saw that dllhost.exe was holding two locks to the root directory. When I manually closed these handles, then I was able to safely remove the drive.

    The dllhost's command line was:
    C:\WINDOWS\System32\DllHost.exe /Processid:{DFB65C4C-B34F-435D-AFE9-A86218684AA8}

    When I looked in regedit for this GUID, I found it referenced in this key: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{AFC7B6DE-D642-41B7-AB0C-A01019510741}
    Values:
    • (Default) REG_SZ Plan9FileSystem
    • AppID REG_SZ {DFB65C4C-B34F-435D-AFE9-A86218684AA8}


    In the Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{AFC7B6DE-D642-41B7-AB0C-A01019510741}\InProcServer32 key I saw a value (Default) REG_SZ C:\Windows\System32\vp9fs.dll

    Looking at vp9fs.dll I see that it has a Microsoft Windows digital signature and looks legit. Googling the "plan 9 file system" seems to give results for some obscure file system.

    I don't understand why this dll is holding a lock on my external hard drive. Is there some way to stop this?

    Windows version: 20H2 build 19042.985.
    Attached Thumbnails Attached Thumbnails Can't "safely remove" external hard drive, dllhost.exe holding lock-dllhost-lock-ehdd.png  
      My Computer


  2. Posts : 42,986
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    You might find a program such as "USB Safely Remove" or similar helpful. E.g. search for
    USB safely remove alternative
      My Computers


  3. Posts : 21
    Windows 10
    Thread Starter
       #3

    dalchina said:
    You might find a program such as "USB Safely Remove" or similar helpful. E.g. search for
    USB safely remove alternative
    If it's possible, I'd like to resolve the problem with the process holding the locks rather than working around it. I just don't get why such an obscure sounding DLL is holding locks on the external drive.
      My Computer


  4. Posts : 42,986
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #4

    Thank you for your reply.


    What's doing your backup?
      My Computers


  5. Posts : 21
    Windows 10
    Thread Starter
       #5

    dalchina said:
    Thank you for your reply.


    What's doing your backup?
    It's a cmd script I wrote that just runs robocopy. Windows Task Scheduler kicks it off once a day in the morning when my computer boots up. The copying usually finishes in about 15 minutes.
      My Computer


  6. Posts : 42,986
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #6

    Then I suggest you add something to your script to deal with that situation...
      My Computers


  7. Posts : 1,594
    win10 home
       #7

    Do you get an error message when ejecting hdd via Devices and Printers?
    It might also be worthwhile disconnecting all peripherals,carry out a clean install,then re-install one at a time and see if the problem still exists.
      My Computer


  8. Posts : 21
    Windows 10
    Thread Starter
       #8

    joeandmarg0 said:
    Do you get an error message when ejecting hdd via Devices and Printers?
    It might also be worthwhile disconnecting all peripherals,carry out a clean install,then re-install one at a time and see if the problem still exists.
    Weirdly, it successfully ejects when removing via the Devices and Printers settings page. (The external hard drive is listed on the "Bluetooth & other devices" section). That is confusing! Why would it eject correctly from there but not from the "safely remove" option?

    Edit: Ok, I rebooted to double check that, and now it can't be removed from either menu. Very strange.
      My Computer


  9. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #9

    Hello @ExtremeUnction,

    It sounds like the Script Exits without the Disconnect Drive working correctly within the code, therefore, it shows as still Connected. Perhaps if you post the code, someone may be able to help.

    Have you Hardcoded the Drive Letter?
    If so, are you sure that when the Drive is Connected, that the SAME Drlive Letter is used?
      My Computer


  10. Posts : 21
    Windows 10
    Thread Starter
       #10

    Paul Black said:
    Hello @ExtremeUnction,

    It sounds like the Script Exits without the Disconnect Drive working within the code, therefore, it shows as still Connected. Perhaps if you post the code, someone may be able to help.
    My backup script doesn't have any code to disconnect the drive when it's done. It's just that I can't manually disconnect the drive myself. Perhaps I explained the situation badly in my OP. Basically, this particular drive doesn't respond to "safely remove" on my laptop and it seems to be caused by some weird dllhost.exe lock from an obscure "Plan9FileSystem" dll.

    The drive behaves this way whether the backup script runs or not. Like just now I rebooted to confirm the other unlock method and I'm still unable to safely remove the drive, even though no application (that I've opened) has touched the drive.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 04:16.
Find Us




Windows 10 Forums