We've all been guilty of ripping our USB drives out of our computers instead of ejecting them properly, only to receive the judgemental pop up telling us we really shouldn't have done that. But when everything on the USB works fine next time you plug it in, you can't help but wonder: does it actually do anything when you safely eject your disk before removing it?
Well, we've done a little background research, and it turns out that it does. In fact, waiting those extra 30 seconds to safely eject could help to properly save your data and software. But the risk really depends on your operating system, and what you're actually doing with your USB drive.
As Phillip Remaker explains over at Quora (in a response that now has more than 11,000 views), our operating systems have been programmed to treat our external drives - like USB sticks - like they'll always be there. It expects the files on it to remain accessible indefinitely and this changes the way it interacts with a flash drive.
This means if a program on your computer is just reading a file and not actually saving any information to the drive, it's probably not going mess things up too much for the files on your USB stick if you suddenly yank it out. But you do risk confusing your computer, says Remaker. "Symptoms could include: Lost data, corrupted filesystems, crashing programs, or hanging computers requiring a reboot."
On the other hand, if you've altered or uploaded new information to your drive at some point, no matter how long ago, things are a bit more risky. That's because our operating systems are too efficient to simply stop what they're doing and save information whenever you tell it to. Instead, most are programmed to do what's known as 'write caching'.
"For efficiency's sake, they don't actually write the files you're moving to the disk until there are multiple files to move. Ejecting the disk is a way of telling the computer that it's time to do the writing, regardless of whether the computer deems it efficient. When you remove a flash drive without warning the computer first, it might not have finished writing to the drive."
This means that pulling your external drive out without warning could result in the file you just saved being lost forever - even if you saved it hours ago.
So how does the "safely remove hardware" command fix this problem? As Remaker explains, the command does the following things:
- It flushes all active writes to disk.
- It alerts all programs (that know how to be alerted) that the disk is going away, and to take appropriate action.
- It alerts the user when programs have failed to take action, and still are holding files open.
Of course, modern operating systems are getting better and better and preparing for us to pull the rug out from under them by trying to write and read files as quickly as possible. Windows has even introduced a feature called "Optimise for Quick Removal" that you can select to make sure files are written quickly, rather than by write caching, which is the most efficient way.
But you can still never be sure exactly when your computer is done with your external flash drive, and that makes pulling it out a big gamble. Bottom line? "You can remove a disk at any time, but you are at the mercy of how well programs using the disk cope with the sudden disappearance of that disk," says Remaker.
So go on and continue living life on the edge, ripping those USB drives out with abandon if you really don't have the 30 seconds to spare. But just remember what's at stake next time you're saving precious information (say, the new Game of Thrones episode...legally downloaded, of course) onto your USB drive.