Contribute
Register

Hard Drive corruption when ejecting another OS drive inside High Sierra

There's another aspect that might well be included in this discussion ...

There is a big difference between "ejecting" and "unmounting".

Unmounting is still electrically connected. Often used by the system to repair volumes that have to be isolated to fix.

I think the distinction deserves some explanation beyond a general claim of a "big difference"

Before I say more, I'm not trying to convince anyone that mucking around with live internal SATA connections is a good idea. But it's also not inherently a disaster.

Obviously, there are a range of effects to consider, which makes generalizing tricky: for example (more hand waving) mainboard RAID. But let's set this aside.

Regarding the point at hand,
I believe "eject" is a euphemism, which includes semantic baggage associated with mechanical load/unload (cartridges and trays). The nomenclature stuck around with USB as yet another form of removable media.

"Eject" might also include semantics for putting the affected buses in a quiet state, but this is esoteric to the question at hand, because for simply disconnecting a SATA drive— as opposed to RAID or other fault events— the buses are isolated and the disconnection event is a form of a spontaneous power cycle. Electrically it won't jabber and cause crosstalk or such disruption... A bad SATA cable could be a nightmare if the design didn't consider bus isolation, but I've never found any conventional wisdom re SATA cables disrupting other devices (not counting RF interference).

"Unmount" is less euphemistic: all pending IO buffers are flushed and volume transactions are completed, then the volume status is marked as clean. From there, the device's contents are no longer updated as such (files) and to the OS the device is only present as a potential.

You need to keep track of all active volumes and underlying agents (e.g. firmware, RAID, etc. But assuming you do, it's an orderly event to disconnect the device.

It's another matter if after you unmount, you explicitly start some other operation on the device, say by running a program like Disk Utility. But macOS will not start spontaneously writing to a raw storage device. A user-initiated action may cause an attachment event and in turn cause an auto-mount, but this is normal semantics.

Just to argue with myself: On one hand, I won't be the least surprised to learn of hazardous edge cases that come from mucking around with the attachment of internal SATA devices. But on the other hand, given that SATA is 20 years old, and that modern controllers include a hot-plug option, the HW are likely to be well behaved.

I have personally tried it on an active system in both macOS and Linux with no ill effects, but even with hot plug enabled macOS doesn't know to reconnect the device.

My view is that it's not inherently bad to unmount (all volumes) and disconnect an internal SATA drive. It's just that then you've got the problem that macOS won't reconnect the device until next boot. So "eject" does have a meaning in context as the obverse of "inject," which doesn't work for internal SATA.
 
Back
Top