Do I Really Need to “Eject” USB Drives?

Do I Really Need to Eject USB Drives

Ever wonder why your computer warns you about ejecting those USB drives before you remove
them? It’s because computers use something called write caching to improve performance—if
you copy something to your drive, sometimes it’ll tell you it’s completed the task, but it’s
actually waiting until it has a few other tasks to perform so it can do them all at once. When you
press eject, it finishes anything in the queue to make sure you don’t yank it out before it’s done.
Windows does a better job of avoiding problems than OS X and Linux, but we recommend
ejecting all your drives anyway. It’s small price to pay for avoiding lost data. While we’re on the
subject: if you’ve ever wondered why your external drives never have as much space as the box
claims they do, we’ve got answers for that as well.

 

Why Computers Want You to Eject Drives

Why Computers Want You to Eject Drives

Obviously, yanking out a drive while it’s being written to could corrupt the data. However, even if
the drive isn’t actively being written to, you could still corrupt the data. By default, most
operating systems use what’s called write caching to get better performance out of your
computer. When you write a file to another drive—like a flash drive—the OS waits to actually
perform those actions until it has a number of requests to fulfill, and then it fulfills them all at
once (this is more common when writing small files). When you hit that eject button, it tells your
OS to flush the cache—that is, make sure all pending actions have been performed—so you can
safely unplug the drive without any data corruption.

 

Why Windows Doesn’t Bug You to Do It

Why Windows Doesn't Bug You to Do It

Mac and Linux use write caching on pretty much all drives, and will let you eject any drive
through your file manager. Windows, however, is a bit more mysterious on this front. It actually
disables this write cache feature for drives it sees as “removable”, because it knows people are
likely to yank them out without ejecting (though you can still eject them by right-clicking on them
and pressing “Eject”). As such, disabling this feature on removable drives decreases the chance
of data corruption. It keeps the cache enabled on non-removable drives, though—and
sometimes it recognizes external USB drives as not removable, which is why your USB drive
doesn’t have an eject button. Paradoxically, it’s also why you need to eject that drive: since

Windows doesn’t see it as removable, it’s enabled the write cache for it, increasing the chance
of data corruption.

You can edit the write cache settings for any drive from the Device Manager. Just expand the
Disk Drives section, right click on the drive you want to edit, and hit Properties. Go to the
Policies tab, and click the “Quick Removal” radio button to disable the cache (or click “Better
Performance” to enable the write cache).

 

Why You Should Probably Manually Eject All Your USB Drives
Anyway

Why You Should Probably Manually Eject All Your USB Drives

So, unlike OS X and Linux, Windows has a few precautions in place for preventing data loss.
However, the write cache isn’t the only thing that can cause data loss. Have you ever tried to
eject a drive and gotten a “file is in use” error? Sometimes there’s something going on in the
background you don’t know about, or sometimes a program is just being silly and has still
locked a file on the drive even if it isn’t using it. If you were to yank it out during one of these
situations, you could still cause data loss. Ejecting it will warn you of the situation, and let you
close the program in question (or use something like previously mentioned Unlocker to unlock
the in-use file).

In the end, there’s no reason not to eject your drives, and doing so will ensure your data is uber-
safe. Windows users may be less likely to experience issues due to the way Windows handles
removable drives, but they aren’t 100% immune. Ejecting the drive is a great habit to get into,
since without it, you wouldn’t always know if it were safe to remove or not.