Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

Do I Really Need to Eject USB Drives Before Removing Them? And what happens if I don't?

user-image
Question ajoutée par Hamza Tahboub , Intern (Web Development) , Insan Wa Alat
Date de publication: 2015/02/22
Vittorio Della Rossa
par Vittorio Della Rossa , Associate Partner , IBM

To have a quick-and-dirty rule I can say:

NO - if you do not write or delete data in yoyr USB

YES - if you wirte or delete some dete 

But, I know, this is not true for all operating systems... why? Because not all Operating Systems perform write operations at the same way.

 

TO better understand, we can assume that every drive has two kind of data in it:

1) DATA FILE - they are really your data, your .doc documents, your movies, your MP3 files

2) A DIRECTORY - where all files contained in your USB are mentionend. Each of your file is mentioned into one entry of direcotry with its name and some more characteristic stored in the entry. As example we could find info regardin the position of the file within the drive and its length

When a write has place you need to perform two operations: the first is to really write what you want and the second is to update (if nedessary) data relative to your file contained into the directory.

BUT very often, for performance reasons, the directory entries are mantained into memory, so when they are updated it is done into memory and not into the drive! And also yor data can be mantained and written in memory, always for performance reasons and this is called write caching. When you eject your drive the eject operation writes really the modified data into your drive, this is the reason why Windows XP called eject safe remove: because your written data are safe! But this two-step operation is not performed in the same way by all operating systems.

 

Indeed last version of Windows seems to avoid the write-caching usage for USB drivers so it is allowed to remove them without eject. Instead Macosx and Linux want eject the USB driver.

Are different choiche in the Performance vs Usability dilemma! My suggestion? Eject do not waste so much time... so eject always!

mirza habeeb
par mirza habeeb , Application Support & Database Developer , Via Technology

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.

Prasanth Prasad
par Prasanth Prasad , Solution Consultant , Dell

Theoretically, you need to do that, so that the file system ownership of the drive is closed. However, the current USB drives - referred to as Flash drives, are hot pluggable, as in you do not need to eject them before physically removing it.

Manal Abuelazaem
par Manal Abuelazaem , Application Developer and Owner , ManalSoft

You can corrupt your data if you remove the disc before ejecting it to through the software. 

Marvin Vassell
par Marvin Vassell , Computer repair , Portmore community college

My friend it is for you to do so2 because of lost information that will lost from from your, USB o hope that help

Safwan Mandayappuram
par Safwan Mandayappuram , Network & System Engineer Team Leader , Regency Group Holding

your data will lose, drive will corrupt. 

Saurav Mitra
par Saurav Mitra , Subject Matter Expert , Binary Semantics Ltd

Yes, it is usually recommended to use the Eject USB option whereas we mostly tend to ignore the message and pull the device out. 

 

What happens?

Technically, the USB is communicating to your system/computer through the peripheral port through small electronic signals that send binary codes to your device (0s and1s) which are in turn processed and shown to users in a human readable format.

 

Using the eject USB option closes the signal transfer b/w the two ports, thus ensuring a safe removal of the device. There's a potential that your USB might crash or data files get broken due to an unexpected interruption.

 

However, the intelligent systems usually prevent the USB crash and so the chances of your device or file damage on directly removing the USB is minimal.

 

Hope this helps!

 

Cheers,

Saurav

Ahmed Hasanain
par Ahmed Hasanain , Network engineer , bsoft network solutions

Yes that's the best practice, it’s about what happens if you remove the device when it’s in use (reading or writing):

When you plug in a USB drive, you give your PC free rein to write and read data from it; some of which is cached.

Caching occurs by not writing information immediately to the USB device, and instead keeping it in your PC’s memory (RAM). If you were to yank the USB drive out of your PC before this information is written, or while its being written, you’ll end up with a corrupted file.

Radwan Alsaffow
par Radwan Alsaffow , System Administrator , Eber

I have never ejected usb drivers before removing them, and i have never experienced any problem.

Jerry John
par Jerry John , Devops Engineer , NeST Technologies

Surely we need to eject before removing pen-drives.Otherwise it may result in data loss and corruption.concept is same as why we use e2fsck command in linux while lvm reduction.

Utilisateur supprimé
par Utilisateur supprimé

It is the best practice though removing it one or twice won't kill it unless some data is being read or copied at that time. This can cause corruption for the data in use.

Also doing the removal without ejecting over a period of time will cause hardware errors with USB ports and the drive itself.

More Questions Like This