Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Why must I eject drives?

Why must I eject drives?
Thread Tools
Mac Elite
Join Date: Nov 2002
Location: Washington, DC
Status: Offline
Reply With Quote
Apr 5, 2004, 11:36 AM
 
One thing I wish I still had from my windows days is the ability to remove a drive without having to 'eject' it first. I have an external hd, an ipod, and a cf flash reader all attached to my laptop and it's a pain sometimes to have to eject all three drives to be able to disconnect them from my powerbook.

Are we ever going to have true plug and play (and unplug?) This 'feature' has been around forever, will it ever be changed?
     
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status: Offline
Reply With Quote
Apr 5, 2004, 11:43 AM
 
Press the CD-ROM eject button on your Windows box when it is booting from, say, a Windows startup CD. It'll let you do it. You're greeted with a pretty blue screen... some plug and play, eh?

You have to "eject" mounted media before you can detach it because when it's plugged in your computer is reading and writing to it, even when you're not explicitly using it. Ever seen the "Remove hardware wizard" on Windows 2000/XP? They have you "stop" devices (ones I've used: iPod, USB flash drives) before you physically unplug them, stating "It is now safe to remove device _____".

It's just safe. We don't like data corruption, do we?
"In Nomine Patris, Et Fili, Et Spiritus Sancti"

     
sworthy  (op)
Mac Elite
Join Date: Nov 2002
Location: Washington, DC
Status: Offline
Reply With Quote
Apr 5, 2004, 11:51 AM
 
maybe my memories are hazy from back then, and I wasn't trying to start one of those 'windows is better at this' type threads, as panther blows it out of the water. I just wish there was a way to simply unplug a device without having to do an extra step.
     
Dedicated MacNNer
Join Date: Dec 2001
Location: Promised Land
Status: Offline
Reply With Quote
Apr 5, 2004, 11:57 AM
 
Originally posted by sworthy:
One thing I wish I still had from my windows days is the ability to remove a drive without having to 'eject' it first. I have an external hd, an ipod, and a cf flash reader all attached to my laptop and it's a pain sometimes to have to eject all three drives to be able to disconnect them from my powerbook.

Are we ever going to have true plug and play (and unplug?) This 'feature' has been around forever, will it ever be changed?
Actually, you could never safely remove a disk from Windows either. DOS was usually okay, but from Win 95 and on you were always supposed to "eject" a drive.

The reason an eject is needed, especially in OS X and XP, is that the OS caches filesystem bits in memory for faster access. If you yank a drive out from under the OS, it won't have a chance to write those cached bits back to the filesystem and you end up with corruption and/or data loss.

I'm not sure there is an easy way to get rid of this requirement either, since you have a chicken and an egg problem. Under OS X (and probably XP) it is easy for the OS to notice a device has been removed, and from that point it is a simple matter to flush the dirty cache bits. Unfortunately, the human user has already yanked the drive. So how do you flush the cache back to a device the no longer exists?

You could probably have a pressure sensor built into a removable device, and once the device was grabbed with enough pressure, it would signal the OS to prepare for device removal. Of course, this would jack up the price of such devices, so companies probably wouldn't be open to the idea.

Now if you have a read-only device, it would be safe to remove it, since nothing in the filesystem can be changed, but you will still have data structures in the OS allocated to that filesystem and they may not be cleaned up properly if you don't formally eject the device.

For the foreseeable future, we smart humans are stuck telling the dumb computer that we are about to do something that could cause problems.

HTH.
G5 2.5 DP/2GB RAM/NVidia 6800 Ultra
PowerBook Al 1Ghz/768MB RAM
6gb Blue iPod Mini
     
Admin Emeritus
Join Date: Oct 1999
Location: Zurich, Switzerland
Status: Offline
Reply With Quote
Apr 5, 2004, 12:59 PM
 
Basically, the reason the Mac (and UNIX/Linux, etc!) have always required you to eject (=unmount) volumes is to prevent data corruption. The fact that Windows does not enforce this, thus subjecting its users to greater potential for data loss, is its fault, not ours.

It's kind of like a Cuisinart not letting you turn it on until you've put on the lid: sure, most of the time you won't have your hands in there. But that one time...

Anyway, especially now in Panther where there are little Eject buttons everywhere, there's no excuse to hot-unplug drives, since it takes one click to unmount them.

tooki
     
Grizzled Veteran
Join Date: Apr 2001
Status: Offline
Reply With Quote
Apr 5, 2004, 01:09 PM
 
Any read/write disk in Windows has to be "unmounted" as well before you disconnect it. With any removable device, Windows will provide an icon in the system tray to stop the device first. This is done as others have said to ensure that all cache is flushed out to the disk.

Windows is supposed to tell you that the disk was removed improperly if you simply unplug one. But this warning box doesn't always come up.

Think of it this way. You can shut your computer down by just pulling the power cord. And in many cases it will recover. But there is always that chance that it won't. Pulling a read/write disk out of any system is a bad thing, Mac, Windows, Linux or others.

It would be nice to have an option to disable caching to certain devices, possibly allowing true hot plugability. But even then, it's not worth the risk.
<This space under renovation>
     
Grizzled Veteran
Join Date: May 2002
Location: UK
Status: Offline
Reply With Quote
Apr 5, 2004, 01:23 PM
 
you can't pull firewire harddrives, and usb card readers and such from windows hot actually, you have to use the crappy little unplug icon in the system try or you get an error saying you could have crashed the system
     
Senior User
Join Date: Apr 2000
Location: Woodridge, IL
Status: Offline
Reply With Quote
Apr 5, 2004, 03:07 PM
 
There's a lot of misinformation here.

Windows XP does allow you to turn off write caching for removable devices (such as Firewire and USB volumes). It's under Properties -> Hardware -> Properties -> Policies -> Optimize for quick removal. With this turned on you can unplug a Firewire or USB disk whenever you like. So, as long as you're not actively writing to it you can just grab and go.

It cand and has been done, and Apple would do well to copy this feature, if only for the iPod's sake.
     
Mac Elite
Join Date: May 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Apr 5, 2004, 07:03 PM
 
Originally posted by diamondsw:
There's a lot of misinformation here.

Windows XP does allow you to turn off write caching for removable devices (such as Firewire and USB volumes). It's under Properties -> Hardware -> Properties -> Policies -> Optimize for quick removal. With this turned on you can unplug a Firewire or USB disk whenever you like. So, as long as you're not actively writing to it you can just grab and go.

It cand and has been done, and Apple would do well to copy this feature, if only for the iPod's sake.
I did not know that - Apple would indeed be smart to implement this.
     
ink
Mac Elite
Join Date: May 2001
Location: Utah
Status: Offline
Reply With Quote
Apr 5, 2004, 07:39 PM
 
Originally posted by diamondsw:
Windows XP does allow you to turn off write caching for removable devices (such as Firewire and USB volumes). It's under Properties -> Hardware -> Properties -> Policies -> Optimize for quick removal. With this turned on you can unplug a Firewire or USB disk whenever you like. So, as long as you're not actively writing to it you can just grab and go.
Not true:

Device Removal in Windows XP

While write caching policy addresses this particular issue, it is recommended that users continue to use the Safely Remove Hardware application when it appears in the notification area. Also, disabling write caching might slow the performance of consumer oriented storage devices.
Given that these devices typically use FAT* as their filesystems, you'd be crazy to just yank them because it has no journaling system to recover data -- also without a write cache, the application that's doing I/O (eg, EXPLORER.EXE, iTunes, or whatever) will be suspended by the kernel until the write completes; making your system seem slow while the write is occuring (remember OS9 anyone?).
     
Admin Emeritus
Join Date: Oct 1999
Location: Zurich, Switzerland
Status: Offline
Reply With Quote
Apr 6, 2004, 12:02 AM
 
As I alluded to above, this is why Mac and UNIX enforce unmounting where possible: they have removable drives deactivate their eject buttons when media is mounted. On PCs, it was always easy to corrupt a floppy or zip disk, because you could just press eject at any time, even mid-use. Macs deactivate the eject button, forcing you to eject in software. With FireWire/USB devices, it can't stop you from disconnecting the cable, but at least it reminds you to not do it, and it also has eject buttons everywhere to remind you to eject.

tooki
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:22 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2