What Happens When You “Safely Remove Hardware” On A Windows Computer?

Safely remove hardware is a process in Windows computers that helps to prevent data corruption when external drives are removed. The process essentially tells the computer to wait for all processes accessing a file system to finish before dismounting the file system, which prevents any more read/write operations from occurring.

When I first started using USB flash drives to transfer and store data, I wasn’t very careful about using the “safe to remove hardware” option (in Windows computers) before removing the drives from the CPU cabinet/tower. Then I observed a couple of my friends who always followed this so-called healthy practice.

So, what is actually happening when you instruct your Windows computer to safely remove hardware? And why is it considered “better” for your computer? More importantly, is it necessary to follow this practice?


Recommended Video for you:

If you wish to buy/license this video, please write to us at admin@scienceabc.com.

“Safe to remove hardware”

In Windows computers, there is a small icon in the bottom right corner of the task bar (system tray), which, when clicked (once), shows a small menu.

Safely Remove Hardware Icon System Tray.

The “safely remove hardware” icon

There’s an item in this menu that lets you inform your computer that you wish to safely remove your external drive, such as a USB flash drive (i.e., pendrive or data stick), external hard drive etc. When you select that item, your computer displays a pop-up telling you that it’s safe to remove the hardware you want to eject from the port.

If the system doesn’t show this pop-up, then your drive is probably still in use, or is being accessed by some program on the computer. If this is the case, instead of the pop-up, the system will display a dialog box, telling you that you can’t remove the hardware because it’s still in use.

USB drive is still in use dialog box

What happens when you select the “safely remove hardware” option?

When you move data from one drive to another (e.g., a USB flash drive to an external hard drive), it takes some time, depending on how much data you are moving and how fast your computer is.

Suppose you start copying a few large video files to your USB drive, but before they are completely written (i.e., the progress bar has reached 100%) on the latter, you suddenly eject the USB drive from its slot. This might lead to a ‘corruption’ of the data on the USB drive. Data corruption simply means that the data you copied to the USB drive could not be properly written, and could therefore potentially be unreadable when accessed later.

When you click on the “safely remove hardware” option, you basically instruct the operating system to wait for all processes accessing a file system to finish, and then dismount the file system, which prevents any more read/write operations for the external drive. If, however, you choose to skip this step, i.e., not click on “safely remove hardware” – especially when data is being written on it – then it might potentially lead to data corruption and data loss on the external drive.

Unplugging a Usb drive

Unplugging a USB drive, especially when it’s still communicating with the operating system, can lead to data corruption.

However, Windows computers can also use what’s called a ‘write cache’, which means that when something needs to be written on an external drive, it’s not written immediately; rather, the system checks whether the user wants to write more data onto the external drive. It’s like a bus waiting for more passengers before departing from its stop. The option of write caching has to be enabled by the user of a Windows computer.

Safely remove hardware write cache

If you select this option (“Better performance” in the screenshot above), Windows will cache data instead of writing it immediately to the external device. While this approach certainly improves the performance of the drive, it also makes data corruption much more likely if the device is removed without using the “safely remove hardware” option.

All in all, you don’t necessarily have to take the “safely remove hardware” approach; you can eject your device by skipping that step and it won’t even lead to data corruption (in most cases). However, if you have enabled “write cache”, then it’s imperative that you take the “safely remove hardware” route to prevent data loss and corruption. Even if you haven’t enabled “write cache”, telling the computer that you are going to remove hardware before actually unplugging it is a good practice. There’s no harm in having a bit more patience!

Suggested Reading

Was this article helpful?
YesNo
Help us make this article better
Scientific discovery can be unexpected and full of chance surprises. Take your own here and learn something new and perhaps surprising!

Follow ScienceABC on Social Media:

About the Author

Ashish is a Science graduate (Bachelor of Science) from Punjabi University (India). He spearheads the content and editorial wing of ScienceABC and manages its official Youtube channel. He’s a Harry Potter fan and tries, in vain, to use spells and charms (Accio! [insert object name]) in real life to get things done. He totally gets why JRR Tolkien would create, from scratch, a language spoken by elves, and tries to bring the same passion in everything he does. A big admirer of Richard Feynman and Nikola Tesla, he obsesses over how thoroughly science dictates every aspect of life… in this universe, at least.

.
Science ABC YouTube Videos

  1. Neutron Stars Explained in Simple Words for LaymenNeutron Stars Explained in Simple Words for Laymen
  2. How Robert J. Oppenheimer became the ‘Father of the Atomic Bomb’How Robert J. Oppenheimer became the ‘Father of the Atomic Bomb’
  3. Higgs Boson (The God Particle) and Higgs Field Explained in Simple WordsHiggs Boson (The God Particle) and Higgs Field Explained in Simple Words
  4. Slowing or Reversing Aging: Can We Live for 180 years?Slowing or Reversing Aging: Can We Live for 180 years?
  5. Detectives Use this Simple Technique to Find Your Fingerprints (Even AFTER You Have Wiped Them Off)!Detectives Use this Simple Technique to Find Your Fingerprints (Even AFTER You Have Wiped Them Off)!
  6. Why is a Circle 360 Degrees, Why Not a Simpler Number, like 100?Why is a Circle 360 Degrees, Why Not a Simpler Number, like 100?
  7. Quantum Mechanics Explained in Ridiculously Simple WordsQuantum Mechanics Explained in Ridiculously Simple Words
  8. Do Fish Get Thirsty and Do They Need to Drink Water?Do Fish Get Thirsty and Do They Need to Drink Water?