alistairphillips.com

I’m : a web and mobile developer based in the Australia.


Disk Not Ejected Properly on macOS High Sierra

I've got a Seagate Desktop Media USB2 HDD that for some reason isn't liking macOS Sierra/High Sierra. Every time the machine wakes from sleep I'm greeted with the "Disk Not Ejected Properly" error message.

The only thing that seems to solve it is ejecting the disk before sleep. Since that's a pain to do manually I've installed sleepwatcher (brew install sleepwatcher and brew services start sleepwatcher) and setup ~/.sleep with:

#!/bin/bash
/usr/sbin/diskutil unmount /Volumes/megaB

With that the disk ejects just before the machine sleeps and automatically mounts when waking up.