External HD refuses to eject ~ no obvious apps/processes preventing it??

Posted:
in macOS edited January 2014
One of my external hard drives simply refuses to eject/un-mount, and I've done everything I can think of to terminate any processes and/or applications that may be using the drive and preventing it from being ejected properly, but I haven't had any success...



Is there some Mac-Jedi way of going about isolating what might be preventing this drive from ejecting properly? I've scoured the activity monitor but can't figure out what might be preventing the drive from ejecting??



Any suggestions would be greatly appreciated... Thanks!

Comments

  • Reply 1 of 6
    MarvinMarvin Posts: 15,322moderator
    Quote:
    Originally Posted by m021478 View Post


    Is there some Mac-Jedi way of going about isolating what might be preventing this drive from ejecting properly? I've scoured the activity monitor but can't figure out what might be preventing the drive from ejecting??



    Open the terminal and type df, hit return. This will give you a drive list. Look at what the ID of the drive is - something like disk1s3. Then type:



    lsof /dev/disk1s3



    and it will list open files for the drive. If nothing is showing, you can type:



    hdiutil eject -force /Volumes/drive_name



    You can type that without checking btw. Sometimes it can be the Finder, which you can relaunch using alt-right-click on the icon.
  • Reply 2 of 6
    Quote:
    Originally Posted by Marvin View Post


    Open the terminal and type df, hit return. This will give you a drive list. Look at what the ID of the drive is - something like disk1s3. Then type:



    lsof /dev/disk1s3



    and it will list open files for the drive. If nothing is showing, you can type:



    hdiutil eject -force /Volumes/drive_name



    You can type that without checking btw. Sometimes it can be the Finder, which you can relaunch using alt-right-click on the icon.



    Thanks for the great tip...I'll give it a shot!
  • Reply 3 of 6
    bbwibbwi Posts: 812member
    Turn off your computer. Unplug HD
  • Reply 4 of 6
    Quote:

    Basically you're asking for a daemon to monitor all connections to the device and when that device is requesting an eject that it alerts you to the connections and asks if you want them to be canceled.



    The most common areas are when one has a shell running via Terminal.app or a background process that earlier was posting from your DVD/CD for another application window [Word processing, read only documents, etc] and you forget you still have that parent application open on that original view which accessed the drive.



    Preview.app pulling a PDF from a DVD/CD drive? An image viewer?, et.al.
  • Reply 5 of 6
    Quote:
    Originally Posted by Marvin View Post


    Open the terminal and type df, hit return. This will give you a drive list. Look at what the ID of the drive is - something like disk1s3. Then type:



    lsof /dev/disk1s3



    and it will list open files for the drive. If nothing is showing, you can type:



    hdiutil eject -force /Volumes/drive_name



    You can type that without checking btw. Sometimes it can be the Finder, which you can relaunch using alt-right-click on the icon.



    Very similar to the above command, I've found that sudo umount -f /Volumes/drive_name accomplishes the same task.
  • Reply 6 of 6
    Quote:
    Originally Posted by TB6387 View Post


    Very similar to the above command, I've found that sudo umount -f /Volumes/drive_name accomplishes the same task.



    The additional step of checking if any files are open on the volume will prevent data loss. If you force an unmount, you might corrupt data. The same goes for the eject command in the previous post if you ignore open file handles.
Sign In or Register to comment.