When System Administrator Is No Longer Using the Disk Try Ejecting It Again
After working with an external hard drive (further only - disk) I want to cleanly unmount it. Only to my surprise when pressing the 'eject' button Finder warns me with the following fault messages:
The volume tin can't be ejected because it's currently in apply.
The disk "Elements" wasn't ejected because one or more programs may be using it.
For regular users, I recommend reading another commodity nigh this effect. Information technology describes how to do almost the same matter using the Activity Monitor application, instead of using commands in the Terminal. This article is intended for advanced users (when the "QuickLookUI" process is not the cause) and/or for coder'southward fun
Afterward several attempts, I tried to use the umount control in the Terminal app, and get the same error:
$ umount /Volumes/Elements umount(/Volumes/Diskname): Resources decorated -- try 'diskutil unmount'
And the aforementioned with the diskutil unmount command recommended in previous mistake bulletin:
$ diskutil unmount /Volumes/Elements Volume Elements on disk4s1 failed to unmount: dissented by PID 16314 (/Organisation/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuickLookUI.framework/Versions/A/XPCServices/QuickLookUIService.xpc/Contents/MacOS/QuickLookUIService)
What causes this error
This error message is cocky explanatory. It means that we are trying to eject the disk that is currently in use. If we take whatever file stored on the deejay open in whatsoever app, macOS may prevent us from ejecting the disk and so we don't lose any of our data. If this happens, we just need to close the file in question and try again eject the deejay. Merely I'm sure I have not launched any app neither opened any file from the disk.
In some cases, macOS will allow us to "force-eject" the disk, simply we may still lose information, then force eject is not reasonable.
What I accept:
- Drive: WD Elements Portable 1Tb
- OS: macOS Loftier Sierra 10.xiii.1
- Computer: MacBook Air eleven-inch (2014)
How to solve it
Commencement I found this article on the Apple Support website, but unfortunately it did not help. In short, it says to logout, then login again and endeavour to squirt the disk. And if you nevertheless can't eject the disk, it suggest to shut down the computer and then unplug the deejay…
As I'thousand in the middle of doing multiple tasks, logging out and logging in is not preferred as is the installation of third political party software like the What's Keeping Me? or the Why not unmount?. I prefer a clean unmount of the bulldoze. So I need to find the solution myself.
As far equally I'thou aware, I'm not using the disk but Finder says I practise, so I must be wrong. At present I need to know what app is using my disk so I tin can properly quit that app and eject my deejay. To solve this, we will apply the Last app and few console tools. All the tools are congenital-in in macOS, so we do not need to download or install anything. Allow's begin!
Launch the Terminal app from the Utilities folder of your Applications folder, or use Spotlight to observe it.
Firstly nosotros demand to find the name of our deejay:
Elements Macintosh Hard disk drive
"Macintosh Hard disk drive" is an internal MacBook bulldoze, and "Elements" is my external hard bulldoze. So, in my instance, the proper name of the disk is "Elements". In your case, the disc name will be different.
The beneath commands assume this is Elements, but replace Elements with the right disk proper name if it's something unlike.
Now permit'due south find out which organization procedure uses our deejay. For this we apply the lsof tool.
sudo lsof | grep /Volumes/Elements Nosotros must run the above command with
sudo(equally an Admin). For this we need to enter our password when prompted.
Notation! Exercise not forget to supersede "Elements" with the proper name of your disk before pressing Enter.
Enter your password after prompted and then spotter the magic happen…
mds 83 root 21r DIR 1,15 288 2 /Volumes/Elements mds 83 root 22r DIR 1,15 288 2 /Volumes/Elements mds 83 root 24r DIR 1,15 2208 21 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35 mds 83 root 25r DIR i,xv 288 2 /Volumes/Elements mds 83 root 27u REG 1,15 0 72 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/journalExclusion mds_store 252 root txt REG ane,15 24 620 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/0.indexDates mds_store 252 root txt REG ane,15 10 621 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/0.indexGroups mds_store 252 root txt REG i,xv viii 627 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/0.indexCompactDirectory mds_store 252 root txt REG 1,15 2056 626 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/0.indexDirectory mds_store 252 root txt REG 1,15 8192 588 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/live.0.indexCompactDirectory mds_store 252 root txt REG 1,15 13108 582 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/live.0.indexGroups mds_store 252 root txt REG one,15 16448 587 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/live.0.indexDirectory mds_store 252 root txt REG one,15 96 619 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/0.indexIds mds_store 252 root txt REG one,15 32768 581 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/live.0.indexDates mds_store 252 root txt REG 1,15 65536 630 /Volumes/Elements/.Spotlight-V100/Shop-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/0.directoryStoreFile mds_store 252 root txt REG i,xv 72256 628 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/0.indexArrays mds_store 252 root txt REG 1,15 131072 57 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/reverseDirectoryStore mds_store 252 root txt REG i,15 131072 580 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/live.0.indexIds mds_store 252 root txt REG ane,15 131072 591 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/alive.0.directoryStoreFile mds_store 252 root txt REG i,15 2097152 584 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/live.0.indexTermIds mds_store 252 root txt REG 1,xv 2097152 586 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/alive.0.indexPositionTable mds_store 252 root txt REG 1,15 4194304 589 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/live.0.indexArrays mds_store 252 root 27r DIR 1,15 2208 21 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35 mds_store 252 root 42r REG 1,15 72256 628 /Volumes/Elements/.Spotlight-V100/Shop-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/0.indexArrays mds_store 252 root 44r DIR 1,15 2208 21 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35 mds_store 252 root 65u REG 1,15 28 28 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/indexState mds_store 252 root 66u REG i,15 593920 55 /Volumes/Elements/.Spotlight-V100/Shop-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/store.db mds_store 252 root 67u REG one,xv 593920 56 /Volumes/Elements/.Spotlight-V100/Shop-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/.store.db mds_store 252 root 68r REG ane,15 8 627 /Volumes/Elements/.Spotlight-V100/Shop-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/0.indexCompactDirectory mds_store 252 root 69u REG 1,15 4096 618 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/0.indexHead mds_store 252 root 70u REG 1,xv 96 619 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/0.indexIds mds_store 252 root 71u REG i,15 24 620 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/0.indexDates mds_store 252 root 72r REG 1,15 1694 622 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/0.indexPostings mds_store 252 root 79r REG ane,fifteen 2056 626 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/0.indexDirectory mds_store 252 root 99u REG 1,15 65536 630 /Volumes/Elements/.Spotlight-V100/Shop-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/0.directoryStoreFile mds_store 252 root 103u REG 1,15 4096 579 /Volumes/Elements/.Spotlight-V100/Shop-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/alive.0.indexHead mds_store 252 root 106u REG 1,15 131072 580 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/live.0.indexIds mds_store 252 root 108u REG 1,15 13108 582 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/alive.0.indexGroups mds_store 252 root 109u REG 1,15 2097152 583 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/alive.0.indexPostings mds_store 252 root 110u REG 1,15 2097152 584 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/live.0.indexTermIds mds_store 252 root 111u REG ane,xv 8388608 585 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/live.0.indexPositions mds_store 252 root 112u REG 1,15 2097152 586 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/live.0.indexPositionTable mds_store 252 root 113u REG 1,15 16448 587 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/alive.0.indexDirectory mds_store 252 root 114u REG 1,fifteen 8192 588 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/alive.0.indexCompactDirectory mds_store 252 root 115u REG ane,15 4194304 589 /Volumes/Elements/.Spotlight-V100/Shop-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/live.0.indexArrays mds_store 252 root 116u REG 1,15 131072 591 /Volumes/Elements/.Spotlight-V100/Store-V2/C59C29F8-4296-456C-B45B-CBD4AF706C35/live.0.directoryStoreFile QuickLook 16314 arthur 3r REG 1,15 2283237221 3207 /Volumes/Elements/PATH/TO/FILE/filename.mov
The output of the control may seem complicated in understanding, only information technology is not. The offset column indicates the running process, and the last column indicates the file on our disk that is currently in use. In my case, three processes are running: mds, mds_store and QuickLook. Also, the subconscious folder .Spotlight-V100 and the file filename.mov are used. So now I know what is preventing me from ejecting my disk.
The mds and mds_store processes are related to Spotlight. Y'all can learn more than about it here. Running these processes mean that the Spotlight is currently indexing our disk. Nosotros tin can leave the deejay turned on for a while, and then that the Spotlight could finish its piece of work, or nosotros tin force the process to end.
The QuickLook process is a characteristic that was introduced in the Mac Bone X 10.v Leopard. You lot can learn more nigh it here. I noticed that when I utilize the Quicklook characteristic to preview a video in any format, the process keeps active even when the Quicklook window was already closed. If I preview whatever other file similar PDF or JPG the disk can exist ejected ordinarily. Why does Quicklook preventing me from ejecting my disk? I doubtable that this is merely a bug.
One time we know what process is preventing us from ejecting our disk, we can strength it to stop. For this we use the killall tool.
Nosotros must run the in a higher place control with
sudo(as an Admin). For this we need to enter our password when prompted.
Note! Practice not forget to replace "mds" with the name of process that you want to stop before pressing Enter.
As well we can do this past using the Activeness Monitor.
Finally, issue the following control to unmount the deejay, replacing "Elements" with your bodily disk proper name.
diskutil unmount /Volumes/Elements Volume Elements on disk4s1 unmounted
Determination
That's it, y'all're done. Now our deejay should be safely ejected. So unproblematic isn't it?
If you lot are having trouble fixing this problem with the instructions above, only are being able to solve this problem with any another method delight describe information technology in the comment department below. Thank you!
If this article has helped y'all solve the problem then please leave a annotate
Thanks for reading!
borkholderuposecushers.blogspot.com
Source: https://mycyberuniverse.com/macos/how-fix-volume-cant-be-ejected-because-currently-use.html
Post a Comment for "When System Administrator Is No Longer Using the Disk Try Ejecting It Again"