problems ejecting USB drives, no force eject, list remains in devices list

Hello all. I have trolled the internet looking for a solution to this with no avail.

Basically, anytime I plug a USB device into my computer I have no way of ejecting/force ejecting/etc, I just have to pull it out/unplug it. From disk utility, it cannot unmount the drive because it says it is 'in use'. I've checked my spotlight preferences and have tried running some of the terminal scrips to see if there was something in use.

I have been having this problem for awhile now, and just ignoring it. However last week I ran a workshop and plugged multiple USBs into my laptop which has now resulted in a very long list of 'phantom' devices in my device list. They just don't disappear unless I reboot and I don't reboot that often, perhaps once every two weeks. It's simply anoying and my students don't appreciate hearing a chime after I unplug their USB sticks...

User uploaded file

I have a Macbook Air running 10.8.3.

OS X Mountain Lion (10.8.3)

Posted on May 25, 2013 3:55 AM

Reply
16 replies

May 25, 2013 8:24 AM in response to f_andrea_w

f_andrea_w wrote:


Hello all. I have trolled the internet looking for a solution to this with no avail.

Basically, anytime I plug a USB device into my computer I have no way of ejecting/force ejecting/etc, I just have to pull it out/unplug it. From disk utility, it cannot unmount the drive because it says it is 'in use'. I've checked my spotlight preferences and have tried running some of the terminal scrips to see if there was something in use.

I have been having this problem for awhile now, and just ignoring it. However last week I ran a workshop and plugged multiple USBs into my laptop which has now resulted in a very long list of 'phantom' devices in my device list. They just don't disappear unless I reboot and I don't reboot that often, perhaps once every two weeks. It's simply anoying and my students don't appreciate hearing a chime after I unplug their USB sticks...

Your students may be annoyed because unplugging their USB drives without unmounting or ejecting them first could be corrupting their directories. You've checked Spotlight preferences but for what? Unless the USB drives are each included in the Privacy pane, Spotlight may be indexing them. Also, in View Options, do you have "Show Icon Preview" checked? If so, that could explain why the drives are "in use" because their contents are being read to construct the previews, and USB flash drives are notoriously slow in both reading and writing, so if there are lots of USB flash drives with lots of files on them, you'll be getting done before they do.


In any case, how long does it really take to reboot? Most of the MacBook Air models use SSD rather than HD storage and shutting down and booting should be pretty quick.

May 25, 2013 3:42 PM in response to FatMac-MacPro

I realise that unplugging USB disks without unmounting or ejecting them is not ideal, however I have rarely in my 20+ years of being a mac owner, have I had to resort to this. I've never had this issue before except within the last three months. I'm not sure if it has something to do with an update or what.

Re: Spotlight, I can't imagine that I'm the only person who can't eject USB drives! I have even just now put the one usb drive that is currently 'active' and not a 'phantom' drive as one of the locations that spotlight should NOT index, but still the drive is unable to be ejected or force ejected. The last resort is like all of the times previous, I have to just pull the usb out.

I have also turned off the 'show icon preview' but that doesn't seem to help.

And regarding the number of files, it does this on *ever* drive I plug into my computer, so the number of files doesn't seem to make any difference.

re: Rebooting, of course this is a way to get rid of the phantom disks in my device list (which currently lists 12 disks!) but this doesn't sort out my issue of ejecting/unmounting USB disks.

re: 'scripts' in terminal. I'm not sure if they are called script, per se, what I mean is I've run lines of code to see what is running on my discs, but I've never managed to find out anythign that seems to help.


Not only is this very annoying, but it can't be good for a USB...

May 25, 2013 4:08 PM in response to f_andrea_w

Back up all data.


If you have more than one user account, you must be logged in as an administrator to carry out these instructions.


Triple-click anywhere in the line below to select it:

sudo lsof +D /V*/W* | grep -v ^mds | open -f -a TextEdit


Copy the selected text to the Clipboard (command-C).



Launch the Terminal application in any of the following ways:


☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)


☞ In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.


☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.


Paste into the Terminal window (command-V). You'll be prompted for your login password. Nothing will be displayed when you type it. If you don’t have a login password, you’ll need to set one before you can run the command. You may get a one-time warning not to screw up. Confirm. You don't need to post the warning. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.

The command may take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear.


A TextEdit window will open. Post the contents of that window, if any — the text, please, not a screenshot. The title of the window doesn't matter, and you don't need to post that.


If any personal information appears in the output, anonymize before posting, but don’t remove the context.

May 26, 2013 5:02 AM in response to Linc Davis

This is what I got in Textedit:

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME


Which really isn't much information. However when I run the command in terminal, I get this warning:

lsof: WARNING: can't stat() msdos file system /Volumes/USB DISK 1

Output information may be incomplete.

assuming "dev=1000010" from mount table


And I get this regardless of whether or not I have a usb stick in one of the two usb ports or not.

I am going to do a restart and see what I get and see if this changes anything. I'll post the results in a new window.


Thanks for your help!

May 26, 2013 9:07 AM in response to f_andrea_w

Please read this whole message before doing anything.

This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, or by a peripheral device.


Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.

Safe mode is much slower to boot and run than normal, and some things won’t work at all, including Wi-Fi on certain iMacs. The next normal boot may also be somewhat slow.

The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.


Test while in safe mode. You won't be able to mount external drives in FAT format, so test one in HFS (OS X) format. Same problem?


After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

May 30, 2013 5:33 AM in response to Linc Davis

Ok, so I logged into safe mode, still had the problem, logged back out and back in and still have the problem.

I get this if I run the command in terminal:

Last login: Thu May 30 14:19:53 on console

xxxxxxxx:~ xxxxxxxx$ sudo lsof +D /V*/W* | grep -v ^mds | open -f -a TextEdit

Password:

lsof: WARNING: can't stat(/V*/W*): No such file or directory

lsof 4.85

latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/

latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ

latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man

usage: [-?abhlnNoOPRtUvV] [+|-c c] [+|-d s] [+D D] [+|-f[cgG]]

[-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+|-M] [-o [o]] [-p s]

[+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names]

Use the ``-h'' option to get more help information.

xxxxxxxx:~ xxxxxxxx$


The txt file is blank.

Jun 2, 2013 1:11 PM in response to Linc Davis

Hello Linc.


I booted into Recovery mode and did several verify and repairs and verify/repair permissions. Also for the **** of it I tried mountin/unmounting a USB from the Disk Utility screen. (which worked perfectly!)

However once I restart and log back in as a user I get the same results as above:


xxxxxxxx:~ xxxxxxxx$ sudo lsof +D /V*/W* | grep -v ^mds | open -f -a TextEdit

Password:

lsof: WARNING: can't stat(/V*/W*): No such file or directory

lsof 4.85

latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/

latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ

latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man

usage: [-?abhlnNoOPRtUvV] [+|-c c] [+|-d s] [+D D] [+|-f[cgG]]

[-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+|-M] [-o [o]] [-p s]

[+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names]

Use the ``-h'' option to get more help information.

xxxxxxxx:~ xxxxxxxx$


So.... we're getting closer, hopefully!

Thanks for your help!

Jun 2, 2013 2:36 PM in response to f_andrea_w

The shell command didn't work because the volume named "WATCHABLES," which you show in your screenshot, wasn't mounted, as I expected it to be. But it's significant that you didn't have the problem in Recovery mode.


Please read this whole message before doing anything.

This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.

Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac.


These steps are to be taken while booted in “normal” mode, not in safe mode. If you’re now running in safe mode, reboot as usual before continuing.


Below are instructions to enter some UNIX shell commands. The commands are harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects.


Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it. The headings “Step 1” and so on are not part of the commands.


Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply.


Launch the Terminal application in any of the following ways:


☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)


☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.


☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.


When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign.


Step 1


Triple-click the line of text below to select it:

kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}' | open -f -a TextEdit

Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). A TextEdit window will open with the output of the command. Post the contents of that window, if any — the text, please, not a screenshot. You can then close the TextEdit window. The title of the window doesn't matter, and you don't need to post that. No typing is involved in this step.

Step 2


Repeat with this line:

{ sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|org\.(amav|apac|cups|isc|ntp|postf|x)/{print $3}'; sudo defaults read com.apple.loginwindow LoginHook; } | open -f -a TextEdit

This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.


Note: If you don’t have a login password, you’ll need to set one before taking this step. If that’s not possible, skip to the next step.


Step 3

launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)/{print $3}' | open -f -a TextEdit

Step 4

ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/**,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts 2> /dev/null | open -f -a TextEdit

Important: If you formerly synchronized with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting.


Step 5

osascript -e 'tell application "System Events" to get name of every login item' | open -f -a TextEdit

Remember, steps 1-5 are all copy-and-paste — no typing, except your password. Also remember to post the output.


You can then quit Terminal.

Jun 2, 2013 3:42 PM in response to Linc Davis

Step 1 result:

foo.tun (1.0)

foo.tap (1.0)


Step 2 result:

net.openvpn.client

org.opensc.pcscd.autostart

net.sourceforge.MonolingualHelper

com.stclairsoft.AppTamerAgent

com.oracle.java.Helper-Tool

com.microsoft.office.licensing.helper

com.google.keystone.daemon

com.barebones.bbedit

com.barebones.authd

com.adobe.versioncueCS3

com.adobe.SwitchBoard

com.adobe.fpsaud


Step 3 result:

com.wacom.wacomtablet

com.wacom.pentablet

com.oracle.java.Java-Updater

com.Logitech.Control

com.google.keystone.system.agent

com.valvesoftware.steamclean

com.facebook.videochat.xxxxxx.updater

com.adobe.ARM.df0ab5bbe6f698196fcc21e3c1e66dcb758bd911f4d637272d9d8109

com.adobe.AAM.Scheduler-1.0


Step 4 result:

/Library/Components:


/Library/Extensions:


/Library/Frameworks:

AEProfiling.framework

AERegistration.framework

Adobe AIR.framework

AudioMixEngine.framework

EWSMac.framework

FontLab.framework

HPDeviceModel.framework

HPPml.framework

HPServicesInterface.framework

HPSmartPrint.framework

MacFUSE.framework

NyxAudioAnalysis.framework

PluginManager.framework

PrivateTunnel.framework

TSLicense.framework

iTunesLibrary.framework


/Library/Input Methods:


/Library/InputManagers:

GearsEnabler


/Library/Internet Plug-Ins:

AdobePDFViewer.plugin

AdobePDFViewerNPAPI.plugin

Flash Player.plugin

Flip4Mac WMV Plugin.plugin

Flip4Mac WMV Plugin.webplugin

Gears.plugin

JavaAppletPlugin.plugin

Quartz Composer.webplugin

QuickTime Plugin.plugin

RealPlayer Plugin.plugin

SharePointBrowserPlugin.plugin

SharePointWebKitPlugin.webplugin

Silverlight.plugin

VeetleBroadcast-0.9.16

VeetleTVCore-0.9.16

VeetleTVPlayer-0.9.16

flashplayer.xpt

googletalkbrowserplugin.plugin

iPhotoPhotocast.plugin

npContributeMac.bundle

npgtpo3dautoplugin.plugin

nsIQTScriptablePlugin.xpt

o1dbrowserplugin.plugin


/Library/Keyboard Layouts:


/Library/LaunchAgents:

com.Logitech.Control Center.Daemon.plist

com.adobe.AAM.Updater-1.0.plist

com.google.keystone.agent.plist

com.oracle.java.Java-Updater.plist

com.wacom.pentablet.plist

com.wacom.wacomtablet.plist


/Library/LaunchDaemons:

com.adobe.SwitchBoard.plist

com.adobe.fpsaud.plist

com.adobe.versioncueCS3.plist

com.barebones.authd.plist

com.barebones.bbedit.plist

com.barebones.bbedit.plist~orig

com.barebones.textwrangler.plist

com.google.keystone.daemon.plist

com.microsoft.office.licensing.helper.plist

com.oracle.java.Helper-Tool.plist

com.stclairsoft.AppTamerAgent.plist

net.openvpn.client.plist

net.sourceforge.MonolingualHelper.plist

org.opensc.pcscd.autostart.plist


/Library/PreferencePanes:

DejaVu.prefPane

Flash Player.prefPane

Flip4Mac WMV.prefPane

JavaControlPanel.prefPane

WacomTablet.prefPane


/Library/PrivilegedHelperTools:

Google Drive Icon Helper

com.barebones.authd

com.barebones.bbedit

com.barebones.bbedit~orig

com.barebones.textwrangler

com.microsoft.office.licensing.helper

com.stclairsoft.AppTamerAgent

net.sourceforge.MonolingualHelper


/Library/QuickLook:

GBQLGenerator.qlgenerator

ParallelsQL.qlgenerator

iBooksAuthor.qlgenerator

iWork.qlgenerator


/Library/QuickTime:

AppleIntermediateCodec.component

AppleMPEG2Codec.component

DivX 6 Decoder.component

FLV.component

Flip4Mac WMV Advanced.component

Flip4Mac WMV Export.component

Flip4Mac WMV Import.component

SoundboothScoreCodec.component


/Library/ScriptingAdditions:

Adobe Unit Types

Adobe Unit Types.osax


/Library/Services:

DotFiles.service


/Library/Spotlight:

GBSpotlightImporter.mdimporter

Microsoft Entourage.mdimporter

Microsoft Office.mdimporter

ParallelsMD.mdimporter

iBooksAuthor.mdimporter

iMovie.mdimporter

iWork.mdimporter


/Library/StartupItems:

ParallelsDesktopTransporter


/etc/mach_init.d:


/etc/mach_init_per_login_session.d:


/etc/mach_init_per_user.d:

com.adobe.SwitchBoard.monitor.plist


Library/Address Book Plug-Ins:

AdiumAddressBookAction_AIM.scpt

AdiumAddressBookAction_ICQ.scpt

AdiumAddressBookAction_Jabber.scpt

AdiumAddressBookAction_MSN.scpt

AdiumAddressBookAction_SMS.scpt

AdiumAddressBookAction_Yahoo.scpt

SkypeABDialer.bundle

SkypeABSMS.bundle


Library/Fonts:

.DS_Store

Bank Gothic

GillSans.ttc

MachineScript.ttf

MyriadPro-Regular.otf

New Cicle Fina.ttf

New Cicle Gordita Italic.ttf

New Cicle Gordita.ttf

New Cicle Semi.ttf

RNS_Camelia.otf

Times.dfont

encodings.dir

fonts.dir

fonts.list

fonts.scale


Library/Frameworks:

.DS_Store

EWSMac.framework


Library/Input Methods:

.localized


Library/InputManagers:


Library/Internet Plug-Ins:

.DS_Store

EvernoteSafariClipperPlugin.webplugin

FacebookVideoCalling.bundle

doubleTwistWebPlugin.bundle

fbplugin_1_0_1.plugin

fbplugin_1_0_3.plugin

iGetterBundle.plugin


Library/Keyboard Layouts:


Library/LaunchAgents:

com.adobe.AAM.Updater-1.0.plist

com.adobe.ARM.df0ab5bbe6f698196fcc21e3c1e66dcb758bd911f4d637272d9d8109.plist

com.apple.AddressBook.ScheduledSync.ABExchangeSource.D9ED394F-BA39-4F32-B404-9C4 3E94B0746.plist

com.apple.FolderActions.enabled.plist

com.apple.FolderActions.folders.plist

com.facebook.videochat.frankiejr.plist

com.valvesoftware.steamclean.plist


Library/PreferencePanes:

.DS_Store

Opera Preferences


Library/ScriptingAdditions:

.DS_Store

iGetterScriptingAddition.osax


Library/Spotlight:

.DS_Store

FontMDI.mdimporter


Step 5 results:

TaskMate, PrivateTunnel Tray, uTorrent, Google Drive, Dropbox, Android File Transfer Agent, SophosUIServer

------------------


BTW, some of these things I don't have on my computer anymore, like SophosUIServer, uTorrent, PrivateTunnel... etc. If that helps at all... Thanks again, I'm optimistic!

Jun 2, 2013 4:56 PM in response to f_andrea_w

Please read this whole message carefully, especially the warnings, before doing anything.

1. Your system is heavily modified, and I can only guess which of the modifications is causing the problem. The changes to your configuration suggested here should be considered provisional; they may not solve your problem, or they may remove functionality that you find useful. If a third-party system modification that you want to keep is causing the problem, refer to its developer for support.

2. WARNING: Back up all data now if you haven’t already done so. Before proceeding, you must be sure you can restore your system to its present state, even if it becomes unbootable. If you’re not sure you can do that, STOP — DON’T CHANGE ANYTHING. If you’re dissatisfied with the results of the procedure suggested below, restore from your backup. I will not be responsible for the consequences, and I will not be able to help, if you ignore this warning.

3. You should either remove or update the following system modification(s), if an update is available from the developer:

N/A

and definitely remove at least the following:

Android File Transfer

Google Drive

OpenSC

4. Whatever you remove must be removed completely, and (unless otherwise specified in this message) the only way to do that is to use the uninstallation tool, if any, provided by the third-party developers, or to follow their instructions. If the software has been incompletely removed, you may have to re-download or even reinstall it in order to finish the job. I can't be more specific, because I don't install such things myself. Please do your own research.

You will generally have to reboot after uninstalling a system modification. Until you do that, the uninstallation may have no effect, or unpredictable effects.

Here are some general guidelines to get you started. Suppose you want to remove something called “BrickYourMac.” First, consult the product's Help menu, if there is one, for instructions. Finding none there, look on the developer's website, say www.brickyourmac.com. (That may not be the actual name of the site; if necessary, search the web for the product name.) If you don’t find anything on the website or in your search, contact the developer. While you're waiting for a response, download BrickYourMac.dmg and open it. There may be an application in there such as “Uninstall BrickYourMac.” If not, open “BrickYourMac.pkg” and look for an Uninstall button.

Again, please don't ask me to do this research for you. You can do it better than I can, because I haven't installed the product and I may not even know what it is.

If you can’t remove software in any other way, you’ll have to erase your boot volume and perform a clean reinstallation of OS X. Never install any third-party software unless you're sure you know how to uninstall it; otherwise you may create problems that are very hard to solve.

WARNING: Trying to remove complex system modifications by hunting for files by name often will not work and may make the problem worse. The same goes for "utilities" that purport to remove software.

5. I recommend that you never reinstall the modifications marked with a dagger (†) above, if any. If your problem is resolved after uninstalling all the above modifications and rebooting, but you still want to use some of those not marked with a dagger, you can experiment with putting them back, one at a time, testing carefully after each step. Keep in mind that system modifications may be incompatible with each other or with future OS X updates, so it may not be clear which one is at fault.

6. If you still have problems after making the suggested changes and rebooting, post again. Remember: if you don’t like the results of this procedure, you can undo it by restoring from the last backup you made before you started.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

problems ejecting USB drives, no force eject, list remains in devices list

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.