4

I have Mac Mini Mid 2011 with macOS 10.13.5 with a data drive. When I wake up at night, the drive is running. I ran fs_usage and was surprised to find macOS accessing the drive a lot.

How do I stop macOS from spinning the drive, except when accessed by a human, or at least not at certain hours when I sleep? Can Spotlight/macOS be configured to lay off the drive at night?

00:01:10  fsgetpath         /Volumes/FOOBAR  0.000022   mds
00:01:10  statfs64          /Volumes/FOOBAR  0.000015   Finder
00:01:10  getattrlist       /Volumes/FOOBAR  0.000017   Finder
00:08:59  getattrlist       /Volumes/FOOBAR  0.000019   backupd-help
00:39:54  getattrlist       /Volumes/FOOBAR  0.000031   diskspaced
00:39:54  getattrlist       /Volumes/FOOBAR  0.000081   diskspaced
00:39:54  statfs64          /Volumes/FOOBAR  0.000014   diskspaced
01:08:47  getattrlist       /Volumes/FOOBAR  0.000017   backupd-help
02:08:35  getattrlist       /Volumes/FOOBAR  0.000020   backupd-help
03:08:40  getattrlist       /Volumes/FOOBAR  0.000033   backupd-help
04:04:09  getattrlist       /Volumes/FOOBAR  0.000019   fontworker
04:04:39  getattrlist       /Volumes/FOOBAR  0.000015   fontworker
04:11:01  getattrlist       /Volumes/FOOBAR  0.000032   backupd-help
05:11:56  getattrlist       /Volumes/FOOBAR  0.000052   backupd-help
06:05:23  getattrlist       /Volumes/FOOBAR  0.000030   backupd-help
06:33:52  getattrlist       /Volumes/FOOBAR  0.000017   fontworker
06:34:15  getattrlist       /Volumes/FOOBAR  0.000020   fontworker
06:34:48  getattrlist       /Volumes/FOOBAR  0.000014   fontworker
06:36:23  fsgetpath         /Volumes/FOOBAR  0.000012   revisiond
06:36:23  fsctl             /Volumes/FOOBAR  0.000010   revisiond
06:36:23  getattrlist       /Volumes/FOOBAR  0.000023   revisiond
06:36:23  statfs64          /Volumes/FOOBAR  0.000011   revisiond
06:36:23  lstat64           /Volumes/FOOBAR  0.000010   revisiond
06:36:23  lstat64           /Volumes/FOOBAR  0.000008   revisiond
06:36:23  statfs64          /Volumes/FOOBAR  0.000007   revisiond
06:36:23  getattrlist       /Volumes/FOOBAR  0.000012   deleted
06:36:23  statfs64          /Volumes/FOOBAR  0.000005   deleted
06:36:23  lstat64           /Volumes/FOOBAR  0.000009   deleted
(...)
06:36:23  getattrlist       /Volumes/FOOBAR  0.000055   AOSHeartbeat
06:36:25  statfs64          /Volumes/FOOBAR  0.000006   df
06:36:30  HFS_update /Volumes/FOOBAR/..V100/../db.sqlite-wal launchd
  • 1
    Is "Put hard disks to sleep when possible" enabled in Energy Saver prefpane? – Trellis Aug 4 '18 at 19:27
  • Is "Power Nap" disabled (Energy Saver prefpane as well)? – nohillside Aug 5 '18 at 14:02
  • Ah, right, PowerNap in Mini is only from late 2012 onwards – nohillside Aug 5 '18 at 14:27
  • From looking at the timestamps it always wakes up a few minutes after the hour. Are there are other devices on your network which might send a WOL (wake on LAN) signal? – nohillside Aug 5 '18 at 14:29
  • @nohillside: I can't imagine what that would be. – forthrin Aug 5 '18 at 14:38
1

I believe the best solution would be mounting and unmounting the drive to completely ensure no activity from the OS or any other rogue processes.


There is an already built solution that is paid: Following this guide can help with more advanced settings how to unmount and mount the drive.


A free Solution would be combining

Apple Script disk mounting with Time scheduling to execute script

  • That's actually quite an effective workaround, at least until a root cause and proper solution is found. – forthrin Aug 5 '18 at 14:20
  • I'd be really curious to see a custom AppleScript that does that, as potential other solutions that i'd probably use it for would be a time-machine drive, but leaving it on at night for backups and turning it off in the day time... – akostar Aug 5 '18 at 14:40
  • 2
    I simply added diskutil (un)mountdisk /dev/disk2s2 to my crontab. Hack-ish, but it will work until I find a proper solution. – forthrin Aug 5 '18 at 14:44
  • This would be very effective coupled with sleep settings and power nap settings and locating Time Machine data off the drives in question. – bmike Aug 7 '18 at 11:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .