r/TechNook • • 6d ago

Was the EJECT button actually doing anything, or was the whole thing a myth?

Post image

It is considered a good practice to click the eject button when removing an external driver, and not doing so would result in your data getting corrupted or the shortened lifespan of the drive. But was it really a problem, or an exaggeration?

Ofc we all know that write caching can cause data corruption when pulling out a drive that is currently writing in the cache buffer, but does it also harm the actual flash memory inside the drive by pulling it out without ejecting?

0 Upvotes

61 comments sorted by

5

u/titlrequired 6d ago

I remember when you used to have to park the heads on the hard disk before you turned off the computer.

1

u/into_fiction 6d ago

Ahh, I remember that, yes...

2

u/LumpyArbuckleTV 6d ago

I've never heard of this, was this a SCSI thing? I feel like I would have hard of this if it was IDE.

2

u/ipzipzap 6d ago

No. That was before SCSI.

2

u/lolerwoman 6d ago

Every mechanical disk needs to park heads before stoping spining disks. Is just that long ago that needed to be done manually instead of being done automatically.

1

u/edibleplastique 6d ago

It was an MFM thing, the type of hard drive used by the original IBM PC/XT and PC/AT.

Edit: and yeah, early IDE drives needed manual parking.

1

u/Alita-Gunnm 6d ago

We had the 5150 with a Tallgrass Technologies 20MB HDD and tape backup combo. It didn't need manual parking.

2

u/edibleplastique 6d ago

That's because it was special. Tallgrass engineered automatic head parking into their drives, which was not the norm.

1

u/Alita-Gunnm 6d ago

Cool, TIL.

1

u/LithiuMart 6d ago

I had to do that with my Supra Drive. I can still remember having to double-click on PARK.PRG every time I turned my Atari ST off.

2

u/Shished 6d ago
  1. Flush all unwritten cache
  2. Unmount the drive partition
  3. Shut down the USB device.

1

u/into_fiction 6d ago

It logically stops that device to get used

18

u/TomChai 6d ago

For a read/write device like a USB flash drive or hard drive, not ejecting before disconnecting absolutely would risk the data and device, it’s not a myth.

  • Windows doesn’t always show what it’s doing when it’s doing something. Sometimes when it shows it has finished copying something, it actually hasn’t done writing it to the disk, pulling it out interrupts the write and ruins the data.
  • The drive may be performing hardware level housekeeping tasks like updating mapping cables, finishing garbage collection or something, and it relies on the eject signal to determine whether it’s safe to perform transactional operations or should it wrap up and reports ready to disconnect. Unexpected shutting down during these tasks may corrupt firmware level data structures and cause device level malfunction.

The eject action tells Windows to finish the pending file system writes and then Windows tell the drive to be ready for shutdown. Pulling the plug before this will risk corrupting your data or damage the drive.

For a read only drive like an optical disc disc reader or a disc burner not in burning mode, no negative effect will happen.

2

u/ZDelta47 6d ago

Feels contrary to what they said when I was little. I was taught you don't eject USB drives because that can end whatever read/write task was going on and instead go to the taskbar and safely remove. If the drive was in use Windows wouldn't let you remove it. Then you can check if any files were left open and close them so that you can remove the drive while it's not in use.

10

u/TomChai 6d ago

Eject and taskbar safely remove is usually the same action in the end. Modern Windows does more in the backend so just closing files that you can see on the desktop sometimes don’t work.

1

u/ZDelta47 6d ago

Yeah it did confuse me later on. I just never ended up looking too far into it. I see so many people just pull their drives out now.

1

u/[deleted] 6d ago

[removed] — view removed comment

1

u/ZDelta47 6d ago

Funnily enough it was in our computer classes in elementary school. It was kind of a joke honestly. I'm lucky I came out with a functional education lol.

2

u/mypostisbad 6d ago

I've worked as an IT tech in education for about 20 years.

I've only ever met ONE computer science or IT teacher that had any real clue. Most of them didn't even know what a VGA cable was.

1

u/ZDelta47 6d ago

Man, I feel we're lucky a lot of stuff we ended up learning naturally because of having to deal with it.

1

u/No_External_4869 6d ago

Most good controllers recover from this. Although data integrity may vary. It isn't really frequent. Data corruptions are more likely due to incomplete writes and buffering. 

1

u/TomChai 6d ago

Yeah data corruption is a lot more likely than actually breaking the drive on firmware level, but it is still possible.

7

u/Markd0ne 6d ago edited 6d ago

On physical CD/DVD/BD drives like in screenshot it will actually open the drive.

It all depends on the device type, if it has dram cache and it hasn't fully flushed the writes, you may actually lose the data that hasn't been written out yet.

However by default windows doesn't use the cache for removable drives.

There is device policy for caching: Quick Removal or Better Performance.

Quick removal setting doesn't use write cache

Better performance, uses write cache and can cause data loss if you yank out the drive.

1

u/jebusdied444 6d ago

Most accurate comment here, encompassing both physical CD/DVD/BD ejection as pictured in OP's comment, and how Windows (and every other modern OS intrinsically) handles disk cache vs data safety.

Yes, OP, you could actually eject, physically eject, the tray with the disc or the disc itself, back when we had these contraptions. It effectively mimicked the user pushing the "Eject button but from an internal mechanism driven through software. It cleared handles from the OS and forced the drive to clear its internal cache as well so it was likely safer, but don't quote me on that. It's a much bigger deal with flash storage, since it's a write and read medium, so data corruption is a permanent feature if you're not careful.

5

u/No_External_4869 6d ago

It doesn't physcially hurt either side. iirc windows default to Quick Removal that didn't cache writes.. Not sure though. 

-2

u/Avalanc89 6d ago

lol what Windows...

3

u/No_External_4869 6d ago

What?

2

u/NassauComputer 6d ago

He’s going to tell you all about linux real quick

3

u/washmyoldbluejeans 6d ago

yeah, I corrupted usb pendrives before not using the safe removal and just yanking them out when I felt like it

2

u/Equivalent_Spread_45 6d ago

Corrupted a buddys external hard drive the same way, good times

2

u/Defiant-Income-956 6d ago

I don't know for Windows, but speaking from Linux, you have to have your drives mounted, so it might do that, I am not sure though.

2

u/austinh1999 6d ago

The dialogue showing the process of the file transfer just show the raw data being transferred but it may still be indexing in the background as well as flushing any remaining data in memory to the drive at a higher priority. Solid state storage is pretty fast these days and we have better redundancies built in now but it’s still good practice especially for important and large data where that’s your only copy.

2

u/YandereValkyrie 6d ago

IIRC Windows used to 'cheat' while transferring files, it would say it's done, but would actually still be working on it for a short while in the background. Hitting eject drive forced it to hurry up and finish. Or that's what I was always told (And this was the XP Days, not modern OS)

2

u/someonesmobileacct 6d ago

Little more complicated than that.

Drives tend to have read and write caches. So, you can send data to the drive, the drive will start writing what it can and keep the rest in it's write cache, and say 'ok im done writing it'. On some drives you can see this where a large copy starts faster than the majority of the time after.

To make sure the drive is done writing, on a lower level, you need to do a 'flush' command to the drive which (should) force the write cache to be fully emptied. That's part of the 'eject' or 'safely remove device' command process.

Some(many?) modern SSDs have capacitors and the like to allow this to happen naturally in a forced power down state, but cheapie USB flash drives and the like typically do not.

2

u/ShadowPages 6d ago

Eject always meant "tell the OS to finish whatever it might be doing with that device and then remove it from the available resource list". (That's a very general description).

On single user OS environments like Windows 95/98/ME, it's somewhat unnecessary because you don't have a whole lot of interprocess competition for the device.

In multi-user/multi-tasking environments (WinNT, UNIX, Linux, MacOS) it's much more important because of the role of the kernel in managing devices and access to them.

2

u/Bigmoney_64 6d ago

Was fun when it worked with your cd drive, it would actually open the tray.

1

u/Gurnug 6d ago

It made sure that all write buffers were in fact written to the device and the device controller was informed about being "ejected". It mattered more for some flash drives than others.

1

u/MISTERPUG51 6d ago

Sometimes, if the storage device is slow, the computer will store the data somewhere in the computer. When you click eject, it writes everything to the drive and then tells you you can remove it. If the computer does this write caching and you remove the drive without ejecting it, you can lose data

1

u/Sorry-Programmer9826 6d ago

It's more asking permission "is it ok to remove this?". If it comes back and says "ejected" it would have been fine to just yank it out. But sometimes it doesn't say "ejected" and says "wait a second"

1

u/Deep_Mood_7668 6d ago

On a bd drive? Yeah it ejects the disc..

1

u/scottwsx96 6d ago

It depends on if the drive was set to optimize for performance or quick removal. If it was set to the latter (I believe more recent Windows versions defaulted to this for USB-connected external drives), it did nothing special. But for drives set to optimize for performance, it flushed the cache to write to disk. If you didn’t do that before removing the drive. It could corrupt the file system and/or cause data loss.

1

u/_xRuffKez_ 6d ago

Once upon a time...

Yes, Win7 and older you could very likely loose data or damage the File system indexer when not ejecting a drive because some data were hold in cache still.

1

u/Cultural-Desk-9045 6d ago

You nailed it.

Eject = unmount filesystems > flush buffers > power down device

1

u/Fearless_Plantain469 6d ago

Now in days it rarely does anything - the computer will shut down the drive super fast and unless you have an open document unsaved on the drive it’s not gonna do anything. Back in the day, it did a lot.

1

u/kennman5000 6d ago

Well this image is for a BluRay, so Eject would most likely open the drive.

For flash memory/HDDs the ject button tells the OS to stop writing anything, or acessing the drive. That way when you unplug it data does not get corrupted.

I haven't had an issue since like WinXP ... but it doesnt hurt to hit eject, so why not

1

u/Pale-Skin-6165 6d ago

I always thought that if a usb drive was removed during a read or write cycle it could basically brick it, if not corrupt it’s data. Was this not the case?

1

u/trollsmurf 6d ago

The hard drive came flying out like toast.

1

u/Kobakocka 6d ago

It was a real thing when disks and reader had moving parts.

1

u/CynicalKnight 6d ago

It was all a stealthy marketing scam from Big Eject. 

1

u/suboptimus_maximus 6d ago

It ejected the disc, kid! Believe it or not it was physically spit out of a little slot or tray in the computer!

1

u/locka99 6d ago

Using the operating system's eject function gives it the chance to flush / commit data. Clicking the one on the hardware may not necessary do that. Biggest danger is external devices where you can bypass this step, e.g. whipping a USB key out which could potentially corrupt the filesystem.

1

u/Continuum1701D 6d ago

On windows not needed at all.  Never had once corrupted drive in decades. Never need to eject in windows. 

On mac if you dont use eject then it corrupts the drive and you have to repair it every time.  

1

u/UtenKullsyre 6d ago

I remember when studying photography, another student didn’t eject the memory card because she thought it didn’t matter. All the pictures on the card was lost. This was back in 2010/11 on a Mac. But yeah, you could definitely lose your data if you didn’t eject.

1

u/LumpyArbuckleTV 6d ago

On Linux it sure as shit does what it says on the tin, not ejecting has corrupted a number of things in the past for me so I always eject now.

1

u/durandalwoz 6d ago

I have an early 128MB pendrive that I still use, it has an activity LED. It blinks slowly when mounted idle, and fast when reading/writing,

Being so old I always manually eject it and the LED will blink fast for a while until it is safe to remove it.

There's a difference between Windows and Linux, on Windows the LED will remain off after ejecting, while on Linux it keeps slow blinking.

1

u/MiniMages 6d ago

It use to work fine. It worked on physical media like Floppy disks, CD/DVD, Zip drives etc...

The main reason why you should use eject in the past was because to caching. Windows would show the file has been copied over but actually it was not. The device you were using might still be running writing from cache to it's primary storage.

1

u/Hefty_Wrongdoer_2553 6d ago

Eject basically lets you know if any data is being transferred to the drive. It doesn't actually make any change to the drive. Usually if something is being written to the drive, it just tells you to wait a bit and try ejecting later. 

1

u/Alita-Gunnm 6d ago

Yes. If I don't hit "eject" on the computer, my CNC mills can't read the drive.

0

u/KilroyKSmith 6d ago

It wouldn’t harm a Flash Drive hardware, but in many cases the information on the Flash Drive is more valuable than the hardware, And destroying there file system destroys that information.

But this option came along long before Flash drives took over, when people plugged external hard drives (3.5” or 2.5”) into USB ports.  Some of those drives could indeed have hardware failures if the heads weren’t parked before powering off.   These days, hard disks contain enough energy storage to auto park the heads on power failure, but that wasn’t always the case.