Question

Is it necessary or recommended practice to eject external drives before logging out, restarting, or shutting down? (The drives are not being unplugged.)

BTW, I am aware that I need to eject my external drives before unplugging them, I just don't know if it's necessary when logging out or shutting down. It seems to me this should be obvious, but I can't find an explicit answer to this question anywhere. I am interested in answers for Snow Leopard, Lion & Mountain Lion OS versions, as I have 2 machines, one with Snow Leopard, the other with Lion, & I'll soon be upgrading Lion to Mountain Lion.

Was it helpful?

Solution

No, it's only recommended when unplugging the cable.

The reason why you eject is so that any processes reading and writing from the disk will cause OS X to notify you of the disk being in use and prevent data corruption that can occur by just unplugging the disk while it's in use.

Additionally the OS might queue different write operations to a cache before actually writing them to disk, and ejecting will make sure these are flushed to the drive before it is disconnected.

Halting any processes from reading/writing to the disk and flushing the caches is implied when rebooting or shutting down the machine (unless you do a cold shutdown by pressing and holding the power button to turn it off). When logging out, the OS can flush the cache at its own discretion.

OTHER TIPS

There is nothing to gain from explicitly "ejecting" drives before logging pout, shutting down, or restarting in a normal fashion. MacOS X has a subsystem called "Disk Arbitration" (primarily the system daemon process "diskarbitrationd") which mounts drives other than the boot device when a user logs in and unmounts (a.k.a. "ejects") them when the user logs out. Because it operates outside of the context of a user login session, diskarbitrationd is able to assure that processes which are not directly managed by a user (Spotlight indexing, Time Machine, other users' login sessions, etc.) are dealt with correctly when unmounting devices. It also checks for (& usually can quietly repair) filesystem corruption issues before mounting drives. At a deeper level, the OS also has a daemon (update) which flushes the filesystem cache to disk every 30 seconds and a carefully scripted process for shutting down (i.e. the first half of restarting) which assures that all filesystem devices are properly synched and unmounted before resetting or powering down the system. MacOS X is unique in this respect only in the fine details: all significant OS's have matured beyond the need to have users manually assure that drives aren't unmounted in a "dirty" state.

The possible exceptions would be if you do something outside of the operating system to halt or reset the system, such as disconnecting the main power or forcing a hardware reset by a long-press of the power switch. Both could cause filesystem corruption, but no one should be taking such steps except in rare and severe cases where one likely won't have the luxury of being able to manually eject drives. (e.g. smoke, flames, kernel panics, etc.)

No. The short answer is that you eject/unmount a storage device when you no longer wish to use it.

It is perfectly fine to leave an external drive plugged in if you want it available later for yourself or others (such as a Time Machine back up).

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top