Monday, January 7, 2013

Safely remove hardware?

You plug in a USB flash drive, transfer some files and then get ready to unplug it.  If you're like me then sometimes you decide to "safely remove hardware" and sometimes you don't.  I figured that if there weren't any file transfers going on then I should probably be fine, though I wasn't completely confident that was the case.  If you remove it while files are being transferred then yeah you can probably expect data loss or corruption, but I wanted to know about other cases.

According to anecdotal reports it seems like some people "haven't experienced any problems" while others have had data loss or worse when not safely removing hardware.  It depends on the hardware that is being removed though I'm mostly interesting in flash drives.  So it turns out there is an option in Windows for flash drives to optimize for quick removal or better performance.  You can open "Device Manager", expand the "Disk Drives" section, right click a USB drive and select Properties.  If you select the Policies tab you can switch between "Quick Removal" which is the default and "Better Performance".

It says that if you use Quick Removal you don't have to use safely remove hardware!  Obviously you don't want to remove a flash drive while files are being transferred, but this is probably why many people never see any problems.  However you may have to be careful if there is a program in the background that is writing to it.  Many flash drives have blinking lights that will notify you if the device is in use, so that can be another indicator.  If you have Better Performance enabled it says that you must use safely remove hardware.  This is because "write caching" will be enabled.  Basically this means that Windows may not write the data to your drive immediately which can improve performance in some cases.  When you safely remove hardware it will force Windows to write all of the data to the drive to make sure that you don't lose any of it.

There is also a feature called ReadyBoost that if it's enabled then you should probably use safely remove hardware to make sure that there aren't any problems.  I believe this is disabled by default though.  In conclusion if you're just transferring files and the transfer has completed it's most likely safe to just remove the drive.  However if you have "Better Performance" enabled, are using ReadyBoost or just want to be completely safe then use safely remove hardware.

1 comment:

  1. I personally believe that it's better to be safe than sorry. I had a flash drive once where I stored some of my most important files. It just stopped working one day. I couldn't remember doing anything wrong except removing it without waiting for the “Safe to remove hardware” notification. Fortunately I had backup copies of those files.

    Nannie Salyards @ LOK-IT.net

    ReplyDelete