7540 Views 5 Replies Latest reply: May 9, 2008 4:58 PM by tenacity
The USB stick probably won't, "eject," because some files on it are still open. Mac OS, being UNIX-derived, treats file folders pretty much like files themselves when it comes to counting things that are, "open," on a storage medium. Finder windows essentially count as open files.
Be sure to close all files you've been using. You may even have to close the applications that had the files open in order for Mac OS to consider the files closed. Also close any Finder windows you have open displaying contents of the USB stick's folders.
If you are UNIX command line savvy, you can open Applications/Utilities/terminal, and use the lsof (list open files) command to see what's open on on the system. I don't have a USB stick handy at the moment, and I don't recall exactly where external media get mounted in the OSX fie system. Try intentionally opening something on the USB stick, say for example, "MyGreatPhoto.jpg." Use the following command in the terminal:
lsof | grep MyGreatPhoto.jpg
Now you can see the whole path to your file as output from the command above.
Try closing everything on the USB stick then substitute the first dozen or so characters of the path name in place of MyGreatPhoto.jpg in the command above. If the path name contains special characters or spaces, enclose it in quote marks. For example (what you type may be different):
lsof | grep "/Volumes/USB0/"
That should smoke out any straggler files left open.
The ultimate way of dealing with the problem is to shut Mac OS down, then remove the USB stick once the computer is off. This is a bit time-consuming, but is safe.
Not recommended, but if you must: Close all known open files on the USB Stick. Open a terminal window, the issue the command:
Sync tells Mac OS that you want all pending data in I/O buffers to be written out to their respective media. Now remove the USB stick. The only time to use this approach is if there is some reason you can't shut down the Mac, but you have to remove the USB stick.
A few other ideas:
1. Does your Mac account have administrative rights? Under certain conditions, you may not be able to eject media if you are not an administrator.
2. Try checking the USB device with Applications/Utilities/Disk Utility. It could be the file system structure on the USB device has an error that prevents the file system from being cleanly unmounted the the Eject command.
Hope this helps!,
I have on occasion run into times when umount, even with -f specified, won't unmount a file system. In that case shutting down would be the best option. If you aren't the admin, as might be the case in a student lab, you won't be able to use sudo to run a privileged command. I believe even a non admin user should be able to use lsof. At least with lsof, you should be able to find what's preventing the unmount.