Do I have to safely eject my USB key?

Written By: Ontrack

Date Published: 01 August 2019 00:00:00 EDT

Do I have to safely eject my USB key?

For those of you that have used USB keys over the years, I’m sure you have engrained in your memory how crucially important it is to ensure that you safely eject your USB key before removing it from your computer.

The USB key has now been around for 20 years, is this still a necessity? Do you still have to eject your USB key safely from your computer? What does safely ejecting your USB key even mean? And what happens if you don’t safely remove your USB key? This blog aims to answer those questions.

What is a USB key?

Known by many different names, including thumb drive, pen drive, USB flash drive, and USB stick; USB keys come in all shapes and sizes and have a capacity ranging from 2GB to 1TB!

You don't need any power to store data on a USB key due to their non-volatile memories. No power means no moving parts, which means it is not as susceptible to physical damage as say a hard drive is.

A USB key is made up of several components:

  • A USB plug to act as the interface to the host
  • A storage controller to make your device accessible to a host’s system
  • A crystal oscillator for controlling the flow of information
  • NAND flash memory chip for storing data
  • A cover that protects the main parts of the USB key

How does a USB drive work?

Plugging a drive-in sends a command to perform a read request. Most computers equipped with USB ports detect the inserted flash drive and install the necessary drivers to make the data readable. Once the Operating System (OS) has detected a connection in the USB port, users can store and retrieve data. When a file is saved on a USB key, the data is converted to a binary format and forwarded to the drive's NAND chip.

Before the flash drive

Prior to the flash drive, when reading or writing files, an OS would treat a disk as an object – one that had no chance of disappearing mid-read or mid-write. Some media even had mechanical interlocks preventing them from being ejected until the software released the lock thus preventing any lost data or corrupted systems.

This all changed when the USB connected storage device was invented. With no mechanical lock, users could decide to remove the USB from the OS at any time, which when a USB is in use can lead to the corruption of the data stored on it.

What does safe removal do?

So, what exactly does the little button you click to eject your removable storage device do?

 

 Safe removal ensures:

  • Active writes are flushed to the drive.
  • All programmes have been alerted to the fact that the drive is going to be taken away.
  • It alerts the user if any programmes have failed to take action and still have files open.
  • Basically, it ensures that your data is safe!

 

What happens if I don’t safely remove my USB flash drive?

When you insert a USB drive into your computer, your OS starts to use a process called write caching. This is where the host device does not immediately complete writing information to the USB storage device; instead, it caches some part of it to be completed at a later time. Write caching allows applications to run faster by allowing them to proceed without waiting for data write-requests to be written to the disk.

This all sounds great but in reality, write caching can increase the chances of data loss. If you remove your USB before cached information is written or while it is being written, chances are you’ll end up with a corrupted file. Safely removing the USB clears the cache and the remaining data; stopping any process going on in the background.

Have you ever tried to eject your USB drive and receive the error ‘file in use’? This sometimes occurs because there is something going on in the background you don’t know about, or the programme is still locking onto the USB drive even though you are no longer using it. Removing the USB stick when you have this error message can also result in data loss. In this instance, it is best to not ignore the message and close the programme in question.

Ejecting a USB drive from a Windows OS

As described above, write caching is the main reason why you should safely remove your USB stick. But those who have a Microsoft OS may have heard that it actually has a function that disables write caching on removable flash drives thus decreasing the chance of data corruption/loss.

A feature from Windows 10 called ‘quick removal’. This allows you to remove your USB flash drive at any time. Not recommended if you are actively writing files to the drive! This ‘quick removal’ feature keeps Windows from continuously trying to write to the USB drive – helping you in the event of quick removal.

One thing to note though is that Windows hasn’t got rid of the ‘Safely Remove Hardware and Eject’ feature from its System Tray, so it’s obviously deemed still important – if that isn’t a mixed message I don’t know what is!

Conclusion

If you aren’t a Windows user, then there is no question that you should continue to use the ‘Safely Remove Hardware and Eject’ feature found on your computer. This ensures your data is completely safe and that there is no risk of data corruption or loss.

According to Windows, however, if you have Windows 10 then there is no reason why you can’t remove your USB stick without safely ejecting it first.

But, is it really worth risking your data? Especially when there are conflicting messages on Window’s own forum! And if you think about it, how long does it actually take you to safely remove your USB stick? It’s hardly time-consuming!

So, our advice is to keep using the ‘Safely Remove Hardware and Eject’ feature, as it should prevent you from having to contact a data recovery company like us.

More about:

SD card and USB data recovery services and software

Subscribe

KLDiscovery Ontrack Limited, Nexus, 25 Farringdon Street, London, EC4A 4AB, United Kingdom (see all locations)