How bad is it to remove a USB drive without ejecting?

Joined
Nov 27, 2007
Messages
4
Reaction score
0
Points
1
I use a USB memory stick to move files between my XP and OSX 4.10 computers pretty often. I've noticed that, when it doesn't eject immediately, it can take up to five minutes for OSX to eject the drive. Sometimes I am in a rush and need to move the drive quickly. What are my chances of causing serious data loss on the drive if I take the drive out without waiting for the icon to disappear?

On XP, they reccommend that you don't remove the drive without shutting it down, but it is really just a precaution. The OS caches everything before writing, so as long you're not actually writing files to the drive when you pull it out, it won't hurt anything.

I pulled my drive out of my Macbook once without waiting for it to eject, and when I put it back in, OSX told me it was empty. I even gave it to a friend sitting near me, who has the same macbook and version of OSX, and he said it was empty. I tried it again and got nothing, so I tried rebooting and was very relieved to see that OSX had not screwed over my memory stick. I'm happy that it didn't really break anything, but now I am kind of wary of OSX's handling of flash drives.
 
Joined
Aug 15, 2007
Messages
306
Reaction score
8
Points
18
Location
Denver, CO
Your Mac's Specs
Mac Pro, 8GB o' RAM, 4.5 TB o' disc space, OS Ecks 10.6.7, etc
One of two exciting things can happen:

#1: Nothing. This is usually the case.

#2: Drive gets corrupted and becomes inaccessible. Upon every subsequent insertion, the Mac kindly offers to format the drive. You must format it in Windows mode or MSDOS or some such (can't remember) for it to work in cameras and, of course, on Windows machines.

It shouldn't take 5 minutes to eject. Make sure that no running applications are using files on the drive when you try to eject it. Copy over the data then immediately eject the thing and you should be fine.
 
Joined
Apr 29, 2006
Messages
4,576
Reaction score
378
Points
83
Location
St. Somewhere
Your Mac's Specs
Mac Studio, M1 Max, 32 GB RAM, 2 TB SSD
When you say that it takes OS X up to five minutes to eject the drive, may we assume that this is how long the icon takes to disappear from your desktop AFTER you have right clicked and selected EJECT? Such a lengthy delay is highly unusual if this is the case, unless it is a very slow drive and you have written a LOT of data to it. Could this be the case?

In general, as you say, most OS' cache drive contents on the way to writing them, so as to group and speed up accesses. If you remove a drive without ejecting it first (which flushes any cached transactions onto the device) you risk data loss, or even worse, inconsistency, should the OS have been in the middle of writing something to the drive when you removed it.

If your USB drive is formatted with a non journaled file system such as FAT32, this can be disastrous. If it is formatted with HFS+ (the native Mac file system), OS X can easily recover it.

As a rule of thumb, stick with the conventional wisdom. Don't remove a USB peripheral until it has been successfully ejected. If this is taking a long time, you should get to the bottom of that problem vs. trying to work around it.
 
Joined
Dec 6, 2006
Messages
275
Reaction score
15
Points
18
Often times when changing files on a USB flash drive, the data isn't actually changed right away, the changes are cached. By using the OSs eject drive you're ensuring the data changes are completed. I don't know if this is relevent to your issue unless maybe you're changing large quantities of data.
 
OP
L
Joined
Nov 27, 2007
Messages
4
Reaction score
0
Points
1
It's not a particularly slow drive and I usually don't write large amount of data. Sometimes it does this when I just copy one file to the HD and don't write to the flash drive at all.

Yes, I am referring to the icon disappearing. Am I right in interpreting the responses (particularly Joe Redifer's) as "don't take any chances, always wait for it to eject"?

The flash drive uses the FAT32 filesystem. Can Windows XP read and write HFS+? If not, I have to keep using FAT because the flash drive is primarily for windows computers. I would definitely like to get to the bottom of the problem rather than just pulling the drive out before it's ready, if possible.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top